DiamondLil
Technical User
Argggg...help! Ok, the page is here:
I have it connecting to the MySQL server, pulling & displaying information from a table on the server called prologiloads.
Then I have a form with 5 fields that when a user clicks submit, it <SHOULD> insert those values into that table. I keep getting a parse error. I can't get it to work and I'm so frustrated I can't see straight. Please, can someone help?
I'm using <form action="edit.php" method="post"> which is probably wrong but I tried <FORM TARGET="<?php echo $PHP_SELF; ?>" METHOD=GET> as well and that didn't work.
Below is the code that I keep getting errors on:
<?php
if ($newentry == "submit" {
$sql = "INSERT INTO prologiloads SET
loaddate='$loadavaildate',
origcity='$origcity',
origstate='$origstate',
destcity='$destcity',
deststate='$deststate';
if (!@mysql_query($sql)) {
echo ("<p>Your entry has been added.</p>"
} else {
echo ("<p>There has been an error adding your entry: " .
mysql_error() . "</p>"
}
}
//mysql_close();
?>
I have it connecting to the MySQL server, pulling & displaying information from a table on the server called prologiloads.
Then I have a form with 5 fields that when a user clicks submit, it <SHOULD> insert those values into that table. I keep getting a parse error. I can't get it to work and I'm so frustrated I can't see straight. Please, can someone help?
I'm using <form action="edit.php" method="post"> which is probably wrong but I tried <FORM TARGET="<?php echo $PHP_SELF; ?>" METHOD=GET> as well and that didn't work.
Below is the code that I keep getting errors on:
<?php
if ($newentry == "submit" {
$sql = "INSERT INTO prologiloads SET
loaddate='$loadavaildate',
origcity='$origcity',
origstate='$origstate',
destcity='$destcity',
deststate='$deststate';
if (!@mysql_query($sql)) {
echo ("<p>Your entry has been added.</p>"
} else {
echo ("<p>There has been an error adding your entry: " .
mysql_error() . "</p>"
}
}
//mysql_close();
?>