Hi,
i have a registration form, where the user enters username, email, designation and organisation. on clicking register button, the data in this form should get saved into database.
The code is as follows, when i executed it for the 1st time, data was saved properly, but when executed next time, the data is not getting stored in the database, but the username appears in the last echo statement. i am not able to figure out what is happening. can anyone help me in finding out where iam going wrong...
Thanks..
//passing the inputs from the form to php
$username = $_POST['username'];
$email =$_POST['email'];
$designation=$_POST['designation'];
$organisation=$_POST['organisation'];
//inserting into database table users
$sql = "INSERT INTO users values('','$username','$email','$designation','$organisation')";
$sqlres = mysql_query($sql);
echo (" data saved into database ".$username);