I am a novice in php field here, currently I am working on a simple login and registration form for testing. But I get some errors, need some help from you all..tq
Below here is some of my code.. please help, thanks in advance
loginform.php
:
<html>
<form action="signup.php"method="post">
Username=<input type="text" name="n"></br>
Password=<input type="password" name="p"></br>
id<input type="text"name="id"></br>
<input type="submit">
</form>
</html>
signup.php
:
<?php
$conn = mysql_connect("localhost","root","");
$db = mysql_select_db("whatevershit_login","$conn");
?>
<?php
$user = $_POST['n'];
$pass = $_POST['p'];
$id = $_POST['id'];
$sql= "INSERT TO whatevershit_login value (".$id",'"$user"'','"$pass"')";
$query=mysql_query($sql);
#INSERT TO whatevershit_login value (
# 1,
# 'ken',
# 'ken')
?>
and this is the error I get, but I still don't know why.. because I check all the syntax already.. maybe I could be wrong, but I don't know, so I hope can get you all help.. thank you..
Parse error: syntax error, unexpected ':' in C:\wamp\www\signup.php on line 2