Hi Guys
Can any1 correct my coding IT WONT WORK!!! lol
Cheers...
Jonno
=========coding======
<?php include("http://www.****.com/docs/header.php"); ?>
<body>
<table border="1" width="100%">
<tr>
<td width="100%">Add product</td>
</tr>
</table>
<form method="POST" action="<?php echo($PHP_SELF); ?>">
<p> </p>
<p align="center"><font size="1" face="MS Sans Serif">Make: <input type="text" name="Make" size="36"></font></p>
<p align="center"><font size="1" face="MS Sans Serif">Model: <input type="text" name="Model" size="36"></font></p>
<p align="center"><font size="1" face="MS Sans Serif">Derivative: <input type="text" name="Derivative" size="33"></font></p>
<p align="center"><font size="1" face="MS Sans Serif">Product Code: <input type="text" name="Code" size="29"></font></p>
<p align="center"><font size="1" face="MS Sans Serif">Description: </font></p>
<p align="center"><font size="1" face="MS Sans Serif"><textarea rows="4" name="Description" cols="47"></textarea></font></p>
<p align="center"><font size="1" face="MS Sans Serif">Price (Inc Vat &
P&P): <input type="text" name="price" size="20"></font></p>
<p align="center"><font size="1" face="MS Sans Serif">Hint: No need to enter
the '£' sign when entering a price.</font></p>
<p align="center"><input type="submit" value="Update Database!" name="submitpart"></p>
</form>
<p align="center"> </p>
</body>
<?php include("http://www.****.com/docs/footer.php"); ?>
<?php
$dbcnx = @mysql_connect("localhost",
"****", "*****");
if (!$dbcnx) {
echo( "<P>Unable to connect to the " .
"database server at this time.</P>" );
exit();
}
if (! @mysql_select_db("catalog") ) {
echo( "<P>Unable to locate the " .
"database at this time.</P>" );
exit();
}
if ("SUBMIT" == $submitpart) {
$sql = "INSERT INTO site_products SET " .
"Make='$Model', " .
"Model='$Model', " .
"Derivative='$Derivative', " .
"Code='$Code', " .
"Description='$Desciption', " .
"Price='$Price', ";
if (mysql_query($sql)) {
echo("<P>Product Sucessfully Added to the online Parts Database.</P>");
} else {
echo("<P>There was an error adding your submission to the Database: " .
mysql_error() . "</P>");
}
}
?>