Jump to content

returning the id in an echo


An7hony

Recommended Posts

How would i return the id in the echo of this post:

 

$query = "INSERT INTO jobs SET agent = '".mysql_real_escape_string($agent)."', title = '".mysql_real_escape_string($title)."', location = '".mysql_real_escape_string($location)."', salary_from = '".$salary_from."', salary_to = '".$salary_to."', frequency = '".$frequency."', jobtype='".$jobtype."', description='".$description."', email = '".$email."', created_at = '".$created_at."', closing_date ='".$closing_date."', categories = '".$categories."', sectors = '".$sectors."', ref='".$ref."'";
if(mysql_query($query)) {
echo "Job inserted!";
} else {
die(mysql_error());
}

 

Thanks for the help guys

Link to comment
https://forums.phpfreaks.com/topic/226444-returning-the-id-in-an-echo/
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.