I am able to input my data from the previous script and the script will actually process the data and tell me that the order was updated. If I view the database, nothing has changed! Everything else works, I've just been working on this for 2 days straight and i've gotten no where. I know it is in this part of the script. Please let me know if anything obvious sticks out.
Thanks in advance,
Nic
Here is the code:
<html><head><title>Orderboard</title></head>
<body>
<?php
$user=$_POST['username'];
$pass=$_POST['pass'];
$ud_id=$_POST['ud_id'];
$ud_requested=$_POST['ud_requested'];
$ud_needby=$_POST['ud_needby'];
$ud_qty=$_POST['ud_qty'];
$ud_description=$_POST['ud_description'];
$ud_cost=$_POST['ud_cost'];
$ud_price=$_POST['ud_price'];
$ud_notes=$_POST['ud_notes'];
$ud_vendor=$_POST['ud_vendor'];
$ud_placedorder=$_POST['ud_placedorder'];
$ud_orderedby=$_POST['ud_orderedby'];
$query="UPDATE placeorder WHERE id='$ud_id' SET requested=$ud_requested, needby=$ud_needby, qty=$ud_qty, description=$ud_description, cost=$ud_cost, price=$ud_price, notes=$ud_notes, vendor=$ud_vendor, placedorder=$ud_placedorder, orderedby=$ud_orderedby";
$db="orderboard";
$link = mysql_connect("localhost", "root"
;
if (! $link)
die("Couldn't connect to MySQL"
;
mysql_select_db($db, $link)
or die("Couldn't open $db: ".mysql_error());
mysql_query($query);
echo "Order Updated";
mysql_close();
?>
<form method="POST" action="orderboard_update_form.php">
<input type="hidden" name="username" value="<?php print $_POST['username']?>">
<input type="hidden" name="pass" value="<?php print $_POST['pass']?>">
<input type="submit" value="Change Another">
</form>
</body>
</html>
Thanks in advance,
Nic
Here is the code:
<html><head><title>Orderboard</title></head>
<body>
<?php
$user=$_POST['username'];
$pass=$_POST['pass'];
$ud_id=$_POST['ud_id'];
$ud_requested=$_POST['ud_requested'];
$ud_needby=$_POST['ud_needby'];
$ud_qty=$_POST['ud_qty'];
$ud_description=$_POST['ud_description'];
$ud_cost=$_POST['ud_cost'];
$ud_price=$_POST['ud_price'];
$ud_notes=$_POST['ud_notes'];
$ud_vendor=$_POST['ud_vendor'];
$ud_placedorder=$_POST['ud_placedorder'];
$ud_orderedby=$_POST['ud_orderedby'];
$query="UPDATE placeorder WHERE id='$ud_id' SET requested=$ud_requested, needby=$ud_needby, qty=$ud_qty, description=$ud_description, cost=$ud_cost, price=$ud_price, notes=$ud_notes, vendor=$ud_vendor, placedorder=$ud_placedorder, orderedby=$ud_orderedby";
$db="orderboard";
$link = mysql_connect("localhost", "root"

if (! $link)
die("Couldn't connect to MySQL"

mysql_select_db($db, $link)
or die("Couldn't open $db: ".mysql_error());
mysql_query($query);
echo "Order Updated";
mysql_close();
?>
<form method="POST" action="orderboard_update_form.php">
<input type="hidden" name="username" value="<?php print $_POST['username']?>">
<input type="hidden" name="pass" value="<?php print $_POST['pass']?>">
<input type="submit" value="Change Another">
</form>
</body>
</html>