Jump to content

Nothing inserted no error


dflow

Recommended Posts

i have the following processing action for a form

 

query DUMP output is:

string(202) "INSERT INTO contactPO (Status, DateReceived, CustomerEmail, LastName, FirstName, PropertyID, fromdate, todate, nop) VALUES ('1', '24-08-2011', 'r', 'r', 'rrrrr', '12121', '27-10-2011', '30-10-2011','4')"

 

but nothing is inserted

<?php 
$con = mysql_connect("localhost","international","");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
mysql_query("SET NAMES 'utf8'");
mysql_select_db("international", $con);
// check which button was clicked
// perform calculation
if ($_POST['send'])
{
     $query = sprintf("INSERT INTO contactPO (Status, DateReceived, CustomerEmail, LastName, FirstName, PropertyID, fromdate, todate, nop) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s','%s')",

mysql_real_escape_string($_POST['Status']),

mysql_real_escape_string($_POST['DateReceived']),

mysql_real_escape_string($_POST['CustomerEmail']),

mysql_real_escape_string($_POST['LastName']),

mysql_real_escape_string($_POST['FirstName']),

mysql_real_escape_string($_POST['PropertyID']),

mysql_real_escape_string($_POST['fromdate']),
mysql_real_escape_string($_POST['todate']),

mysql_real_escape_string($_POST['nop']));
  var_dump($query ); 
//$url_success = "search-index.php?RID=".$_POST['RequestID']."";
$url_success = "search-index.php";
echo("<meta http-equiv = refresh content=6;url=".$url_success.">");
exit;



mysql_close($con);
} 


?>

Link to comment
https://forums.phpfreaks.com/topic/245598-nothing-inserted-no-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.