I'm new to php and am making a simple login system. When someone wants to register, they go to register.html, then insert.php. The code below should add the data from the form to the table but is doesn't come up in it. I suspect it is probably the line: $sql=INSERT INTO... The only thing appearing is the echo statement at the bottom of the code I know there probably is a simple answer to this, but I still can't find it. Thanks, any help is really appreciated!
Insert.php için kod
<?php
$email=$_POST['email'];
$name=$_POST['name'];
$password=$_POST['password'];
$con = mysql_connect("localhost","user","p@ssword");
mysql_select_db("database", $con);
$sql="INSERT INTO table_name (email, name, password)
VALUES ('$email', '$name', '$password')";
echo"Thank you, you are now registered and can login on our homepage";
mysql_close($con);
?>
Tekrar teşekkürler!