I have this script that for some reason it is not inserting a record into my database. I have spent 2 days and can't find the error. It only inserts up to the "from" field or it doesn't enter the record at all.
Please HELP!!!
<?php
// Read POST request params into global vars
$to = $POST['to'];
$subject = $POST['subject'];
$projectID = $POST['projectID'];
$company = $POST['company'];
$address1 = $POST['address1'];
$address2 = $POST['address2'];
$city = $POST['city'];
$state = $POST['state'];
$zip = $POST['zip'];
$firstname = $POST['firstname'];
$lastname = $POST['lastname'];
$title = $POST['title'];
$telephone = $POST['telephone'];
$from = $POST['from'];
$reachtime = $POST['reachtime'];
$ProductID = $POST['ProductID'];
$purpose = $POST['purpose'];
$baan = $POST['baan'];
$jdedwards = $POST['jdedwards'];
$lawson = $POST['lawson'];
$oracle = $POST['oracle'];
$peoplesoft = $POST['peoplesoft'];
$sap = $POST['sap'];
$othersys = $POST['othersys'];
$whatothersys = $POST['whatothersys'];
$PrefTool = $POST['PrefTool'];
$ToolName = $POST['ToolName'];
$message = $POST['comments'];
$hostname = "localhost";
$dbName = "xx";
$username = "xxx";
$password = "xxxx";
$table = "clients";
mysql_connect($hostname,$username,$password) or die("Unable to connect to database");
@mysql_select_db("$dbName") or die("Unable to select
database $dbName");
$sqlquery = "INSERT INTO $table (projectID, company, address1, address2, city, state, zip, firstname, lastname, title, telephone, from, reachtime, ProductID, purpose, baan, jdedwards, lawson, oracle, peoplesoft, sap, othersys, whatothersys, PrefTool, ToolName, comments, status)
VALUES('$projectID', '$company', '$address1', '$address2', '$city', '$state', '$zip', '$firstname', '$lastname', '$title', '$telephone', '$from', '$reachtime', '$ProductID', '$purpose', '$baan', '$jdedwards', '$lawson', '$oracle', '$peoplesoft', '$sap', '$othersys', '$whatothersys', '$PrefTool', '$ToolName', '$comments', '$status')";
$results = mysql_query($sqlquery);
mysql_close();?>