Here is my code for the form. (connection to server and database have been established at this point)
Code: Select all
<?php
$sql="INSERT INTO users (
name ,
username ,
password ,
confirm ,
email ,
offer ,
music
)
VALUES
(
'$_POST[name]',
'$_POST[username] ',
'$_POST[password] ',
'$_POST[confirm] ',
'$_POST[email] ',
'$_post[offer] ',
'$_post[music] '
)";
if (!mysql_query($sql,$conn))
{
die('Error: ' . mysql_error());
}
echo "You have been added to the site.";
?>
Code: Select all
You have been added to the siteThe values are not showing up in the table when i view the table in phpmyadmin. They are blank. It may be worthy to note that I did a google search and discovered that the id_user )(which I'm using as primary key) may need to be put int he code despite it autoincrementing automatically, but I tried that and still got same result.
Thanks in advance!