Page 1 of 1

browser refreash?

Posted: Sun Nov 28, 2004 2:01 am
by C_Calav
hi guys,

i have a page called "summary.php" with a insert script at the start of it.

Code: Select all

<?php
$sql  = "INSERT INTO customer (C_ID, C_First, C_Last, C_Email, C_Phone, C_Address1, C_Address2, C_Country, C_City) VALUES ('$C_ID','$C_First','$C_Last','$C_Email','$C_Phone','$C_Address1','$C_Address2','$C_Country','$C_City')";
        $result = mysql_query($sql, $db) or die ("Execution failed."); 
?>

i also have a page called "update_summary.php" with a update script at the start of it.

Code: Select all

<?php
	$query = "UPDATE customer SET C_First='$ud_C_First',C_Last='$ud_C_Last',C_Email='$ud_C_Email',C_Phone='$ud_C_Phone',C_Address1='$ud_C_Address1',C_Address2='$ud_C_Address2',C_Country='$ud_C_Country',C_City='$ud_C_City' WHERE C_ID='$C_ID'";

    #execute SQL statement
	$result = mysql_query($query, $db) or die (mysql_error()."<br />Couldn't execute query: $query");
?>


now if i click refreash on the browser "update_summary.php" stays the same

but if i click refreash on on "summary.php" i get "Execution failed." on the page.

can anyone tell me why this is?

Posted: Sun Nov 28, 2004 9:17 am
by John Cartwright
try adding

die ("Execution failed. ". mysql_error()); ?>

as it will give you some more information as what the problem is

Posted: Sun Nov 28, 2004 1:44 pm
by C_Calav
thanx Phenom will try that when i get home!