login code problems

Alles, was PHP betrifft, kann hier besprochen werden.

login code problems

Postby assainator » 28. August 2008 19:22

alright i made a nice login system (i tought) :(

but it gives me a lot of errors and i can't get them all out.

<form action="" method=post>
<input type="text" name="aword" size="20">
<input type="submit" name="do" value="Enter">
</form> <?php /* #20 */ ?>

include ('myincludefile.inc');

mysql_connect($host, $user, $pawr)
or die ("sorry, could not connect to server, try again later");

<form method= post>
SELECT $buser WERE looginname
or die ("your username doesn't excist, maybe you need to <a href=register.php>register</a>.");
SELECT $bword WERE wordpass WERE $buser
or die ("you entered the wrong password, please try again");
header("Location: mainpage.php")

i get 2 errors very often:

unexpected T-string (can anyone tell me what this means???)
expected: { or } (but i can't find where i'm going wrong because it says it expects a } at the end of a line, while there is no tag open at that moment)

i know that there is a {} somewere with nothing inside, but php says it's good so i did it.

any help would be really great! :D
Posts: 6
Joined: 24. August 2008 18:54

Postby Nobbie » 28. August 2008 21:55

>any help would be really great!

Get you a PHP book for beginners or a tutorial - that code is not PHP, its a horrible mix of HTML, PHP and SQL.

There are not 2 errors, the whole script is completely nonsense.
Posts: 10672
Joined: 09. March 2008 13:04

Postby assainator » 30. August 2008 06:51

1. i have a book, but it only explains small parts.
2. it has a big script, but that to big and advance to "disassemble and use the smaller parts so i can understand)
3. and i know there are errors in there, but if i can't get them out because of the lack of experiance, i tought, i post here.


EDIT: well thanks for telling were NOT to go for help.

i posted it on another forum to, and there i get 2 ressponses in one day on how to do it better, with explanation why, and support to learn more.
Posts: 6
Joined: 24. August 2008 18:54

Return to PHP

Who is online

Users browsing this forum: No registered users and 6 guests