Parse Error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Neden
Forum Newbie
Posts: 1
Joined: Sun May 30, 2004 7:22 pm

Parse Error

Post by Neden »

Code: Select all

<? 

<form method='post'> 

Username 
<input type='text' name='alias' value='' size='30' maxlength='25'> 

<input type='password' name='pass' value='' size='30' maxlength='10'> 

IP 
<input type='hidden' name='myip' value='' size='30' maxlength='10'> 

<input type='hidden' name='action' value='join'> 
<input type='submit' name='' value='Submit!'> 

mysql_query("INSERT INTO `users` VALUES ( 
'$alias', 
'$pass', 
'$myip');"); 

} 

?>
Parse error on line 3

I don't see any problems
:?:
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

you can't have HTML inside php tags.... either echo the HTML out or close your php tags and then opent hem when you need to use PHP again
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

Also, in your insert statement, take the ; out
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

But before you do anything, i think you should read a few PHP tutorials and lokat some examples.
Post Reply