I have been trying to link a form that i created to a database… But it just doesn’t seem to be happening…
Can anyone please have a look at the php code given below and let me know where the error lies??
[php]
<?php $username=$_POST['name']; $gender=$_POST['gender']; $dateOfBirth=$_POST['dateOfBirth']; $eMailId=$_POST['eMailId']; $college=$_POST['college']; $password=$_POST['password']; $repassword=$_POST['rePassword']; include('C:\xampp\htdocs\dwd\conn.php'); $sql = "INSERT INTO userinfo VALUES('','".$username."','".$password."','".$gender."','".$dateOfBirth."','".$college."','".$emailid."')"; if($password!=$repassword) { include('C:\xampp\htdocs\dwd\signup.php'); } else { mysql_query($sql,$con); include('C:\xampp\htdocs\dwd\success.php'); } ?>[/php]
Thanks a ton in advance!!