Page 1 of 1

Parse Error

Posted: Sun May 30, 2004 7:22 pm
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
:?:

Posted: Sun May 30, 2004 7:25 pm
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

Posted: Sun May 30, 2004 7:25 pm
by Illusionist
Also, in your insert statement, take the ; out

Posted: Sun May 30, 2004 7:26 pm
by Illusionist
But before you do anything, i think you should read a few PHP tutorials and lokat some examples.