Hi Guys I'm connecting to a database using PHP and MYSQL,
here is the code
<?php
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$username=$_POST['username'];
$confirmusername=$_POST['confirmusername'];
$password=$_POST['password'];
$confirmpassword=$_POST['confirmpassword'];
$email=$_POST['email'];
$confirmemail=$_POST['confirmemail'];
//Database connection
require_once("config.php");
//mysql query to insert value to database
$query=mysql_query("INSERT INTO registration (`firstname`, `lastname`, `username`, `confirmusername`, `password`, `confirmpassword`, `email` ,`confirmemail`) VALUES ('$firstname', '$lastname', '$username' , '$confirmusername' , '$password', '$confirmpassword', '$email' , '$confirmemail'));
//if value inserted successyully disply success message
//if($query)
{
echo 'Registred successfully..!!</div>';
}else
{
//error message
echo '<unable to registred !!</div>';
}
?>
When I click on submit I get the following error
Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\submit-form.php on line 29
Can anybody help me?
Rich