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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.