Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Drop Down Executes Query On Post? Reply To: Drop Down Executes Query On Post?

#170743
MBM
Participant

I’m having problems debugging following the use of error_reporting(E_ALL);

Warning: mysql_query() expects at most 2 parameters, 3 given on line 29

Warning: Cannot modify header information – headers already sent on line 34

if(mysql_query ($DBName, $Query, $Link)){
$message = "Thank you for your comments";
header("Location: snickers.php?message=$message");
}else{
$message = "Error Inserting!";
header("Location: snickers.php?message=$message");

So I changed it to :

if(mysql_query ($query, $Link)){
$message = "Thank you for your comments";
header("Location: snickers.php?message=$message");
}else{
$message = "Error Inserting!";
header("Location: snickers.php?message=$message");

Now there are no errors and the data is written but :

Error Inserting!

Displays after insert.