Hi guys, as I said, this is more assistance than anything.
Here's my code for adding a "User" to my Database
<?
// Make mysql connection below
$mysql_conn = @mysql_connect("****", "*****", "******") or die("Could not connect to the Database, Please send us an e-mail in the contact section");\
@mysql_select_db("*******", $mysql_conn) or die("DataBase does not exist");
// prepare the form values for insert
$name = mysql_real_escape_string($_POST['name']);
$password = mysql_real_escape_string($_POST['password']);
$email = mysql_real_escape_string($_POST['email']);
$values = mysql_real_escape_string($_POST['value1' , 'value2' , 'value3' , 'value4' , 'value5' , 'value6' , 'value7' , 'value8' , 'value9' , 'value10']);
// now i'm going to insert all the values into the database
$sql = "INSERT INTO '****' ( 'name' , 'password' , 'email' , 'values' ) VALUES ('$name' , '$password' , '$email' , '$values')";
$res = mysql_query($sql) or die(mysql_error());
// now, i'm going to let people know when something has gone wrong, or if its gone right.
if(!$res){
echo "Had a bit of a problem with the database, please report this in the help section so that we can totally freak out and fix it.";
} else {
echo "Successfully added you as a member, now you can go and edit your account. First though, you will need to complete subscription in your email inbox";
}
// that concludes the script, thanks for using this service. HAHA!! World domination will be mine. Soon....
?>
I just want to know if this would work? I'm especially not sure of the variable $values, I want lots of values stored in one field, and then recall it later as a list.