Hi everybody i have a problem with data input from html form throu php to mysql the connection has been done i test it and its working but i cant figure out why data isn't imputed ive double checked the database and its as should be
registration form
<form action="register.php" method="post">
<table>
<tr>
<td>UserName</td>
<td><input type="text" name="username"></td>
<tr>
<td>Password</td>
<td>
<input type="password" name="password">
</td>
<tr>
<td>
First Name
</td>
<td>
<input type="text" name="fname">
</td>
</tr>
<tr>
<td>
Last Name
</td>
<td>
<input type="text" value="" name="lname">
</td>
</tr>
<tr>
<td>
E-Mail
</td>
<td>
<input type="email" name="mail">
</td>
<tr>
<td>
<input type="submit" value="Done!!!">
</td>
</tr>
</table>
database conntection
<?php
$db_adress="localhost";
$db_username="root";
$db_password="******";
$db_name="accounts";
@mysql_connect("$db_adress","$db_username","$db_password") or die ("Could not connect the DATABASE for more infos go kill yourself");
@mysql_select_db("$db_name") or die ("No Database");
?>
data input code
$username = $_POST['username'];
$password = $_POST['password'];
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$mail = $_POST['mail'];
$insert=("INSERT INTO 'register'(Username, Password, FirstName, LastName, email) VALUES (""'.$username.'", "'.$password '", "'.$fname.'", "'.$lname.'" ,"'.$mail.'")");
mysql_query($insert);
echo "Done";
I am glad for any help!
$insert=("...")doesn't need brackets around it, just the quotes.echo "INSERT INTO 'register'(Username, Password, FirstName, LastName, email) VALUES ("'.$username.'", "'.$password '", "'.$fname.'", "'.$lname.'" ,"'.$mail.'")"and test the query in sql console