<?php
$con = mysql_connect("localhost","notexper_two","three");
if (!$con){ die('Could not connect: ' . mysql_error()); }
mysql_select_db("notexper_one", $con);
$sql = "INSERT INTO jobs
(catergory, location, jobtitle, jobdescription, salary, jobstatus, company, firstname, surname, email, telephone, fax, userid)
VALUES
('$_POST[catergory]','$_POST[location]','$_POST[jobtitle]','$_POST[jobdescription]','$_POST[salary]','$_POST[jobstatus]',
'$_POST[company]','$_POST[firstname]','$_POST[surname]','$_POST[email]' ,'$_POST[telephone]' ,'$_POST[fax]', '".$_SESSION['username']."')";
if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }
echo "1 record added";
mysql_close($con);
?>
Bookmarks