-1

I am designing a page that will send data for a pet finding business's form to a database, but I am having trouble remembering how exactly to do that since its been a while and I haven't taken a formal PHP class yet.

I have stored all the values sent to the PHP file via the POST method in the form as well as ran them through mysqli_real_escape_string() before using them on this line.

my line for a query for PHP is

$save = "INSERT INTO requests (fName, lName, address, city, state, zip, pPhone, cPhone, email,
pName, species, gender, spayedNeutered, temperament, howLost, comments) VALUES ($fName,
$lName, $address, $city, $state, $zip, $pPhone, $cPhone, $email, $pName, $species, $gender,
$spayedNeutered, $temperament, $howLost, $comments)";

Anybody see any issues this this line?

Tyler Lazenby
  • 409
  • 5
  • 27

1 Answers1

0

Use ' for values

$save = "INSERT INTO requests (fName, lName, address, city, state, zip, pPhone, cPhone, email,
pName, species, gender, spayedNeutered, temperament, howLost, comments) 

VALUES ('$fName',
'$lName', '$address', '$city', '$state',.
Harshit
  • 5,147
  • 9
  • 46
  • 93