$add = 'INSERT INTO `ibtn_sites` (url, username, pass, illcount, status, name, email) VALUES (\'$surl\', \'$username\', \'$password\', \'0\', \'0\', \'$sname\', \'$email\');'; mysql_query($add); Code (markup): This code inserts the variable names into the fields, instead of the variable data This is what I use for the variables: $var = $_POST['name']; Code (markup): I have a form set up properly on another page
Your add variable is set by using a string with single quotes. Essentially, variables are not interpreted in strings defined with single quotes. Change your line to either: $add = 'INSERT INTO `ibtn_sites` (url, username, pass, illcount, status, name, email) VALUES (\'' . $surl . '\', \'' . $username. '\', \'' . $password . '\', \'0\', \'0\', \'' . $sname . '\', \'' . $email . '\');'; or: $add = "INSERT INTO `ibtn_sites` (url, username, pass, illcount, status, name, email) VALUES ('$surl', '$username', '$password', '0', '0', '$sname', '$email');"; A quick note, too: if those zeros are meant to be numbers (as opposed to strings), you shouldn't put quotes around them. MySQL will accept it when not in strict mode, but I promise you you will have troubles with it later on.