Hi All,
Not sure if I am posting in the right area of the forum but I am hoping to get educated quickly by some of the forum's members.
I am a relative newbie to MySQL and php so please bare with me.
I am developing my site and it will use a MySQL database. The site will be maintained by a content management system (PostNuke).
What I am trying to do (quite unsucessfully at this point might I add ) is create a table within the database for a small network of agent to post their available freight load information (and ultimately other users of the site can search for posted available freight loads) I've managed to create the table and dumped some data into but when called to do that from my site (in a php script) the data entered into the form is not being written to the database. I have checked several things, including using my form and script in a html page outside of the postnuke site and still the same results.
Here is the script I am using:
<?php
$DBhost = "localhost";
$DBuser = "***";
$DBpass = "***";
$DBName = "mwlweb";
$table = "loads";
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable to connect to database");
@mysql_select_db("$DBName") or die("Unable to select
database $DBName");
$sqlquery = "INSERT INTO $table
VALUES('$load_number','$IBA_Number','$load_date','$Origin_City','$Origin_State','$Origin_Zip','$Destination_City','$Destination_State','$Destination_Zip','$Miles','$Product','$Equipment','$weight','$Rate','$Dispatch_Number','$Contact','$Comments')";
$results = mysql_query($sqlquery);
mysql_close();
print "<HTML><TITLE> Thanks </TITLE><BODY
BGCOLOR=\"#FFFFFF\"><center><table border=\"0\"
width=\"500\"><tr><td>";
print "<p><font face=\"verdana\" size=\"+0\"> <center>Thank you for posting your load. Update your posted loads by editing your profile.<br><br>
</td></tr></table>
</center></BODY></HTML>";
?>
I am sure that some of the more experienced coders can quickly identify what it is I have done to that code. If some one can help me and you need more information, just let me know or email me at msshelle@midwestlogisticsllc.com and in the meanwhile I'll keep reading.
Thanks in advance
MsShelle: