right im passing an id and $actions variable to another page, then trying to insert them into a database upon submit. the problem is the query, ive checked EVERYTHING else including the database. Ive checked the variables are passing over to the new page properly, by printing them out on the new page and thats fine.
i just cannot for the life of me figure out whats wrong with the query!!
<form name="form1" method="post" action="miscellaneous2.php">
<?php
include("donuts.inc");
$connection = mysql_connect($host,$user,$password)
or die ("couldn't connect to server");
$db = mysql_select_db($database,$connection)
or die ("Couldn't select database");
$result = mysql_query("select * from Products where productType='Miscellaneous'");
while($r=mysql_fetch_array($result))
{
$productID=$r["productID"];
$productName=$r["productName"];
$productType=$r["productType"];
$description=$r["description"];
$productRRP=$r["productRRP"];
$price=$r["price"];
$extraInformation=$r["extraInformation"];
$officialDescription=$r["officialDescription"];
$image=$r["image"];
$f_price = number_format($row['price'],2);
$f_price = $price;
echo "<input type='hidden' name='productID' value='$productID'>";
echo "<table cellspacing='0' border='0' cellpadding='0' width='95%' align='center'>";
echo "<tr>\n";
echo "<td width=\"80%\"><font face=\"Verdana\" color=\"#E5E5E5\" font
size=\"-1\">$productName - $description <b>£$f_price</b></font></td>\n";
echo "<td><a href='../store/listitem.php?id=$productID'
border='0'>
<img src='../store/images/$image' border='0'
width='100' height='80'></a></td>\n";
echo "</tr>\n";
[B]addBasket(); //contains $actions[/B]
echo "<tr>";
echo "<td colspan=\"2\" td background=\"../store/images/linebreak.gif\"> </td>\n";
echo "</tr>\n";
echo "</table>\n";
}
?>
<br>
<input name="submit" type="submit" id="submit" value="Save changes">
</form>
2nd page --->
<?php
$actions = $POST['actions'];
$productID = $POST['productID'];
?>
<?php
include("donuts.inc");
$connection = mysql_connect($host, $user, $password)
or die ("Can't find database, grr");
$db = mysql_select_db($database, $connection)
or die ("Can't find database, grr");
$actions=trim($actions);
$actions=ucfirst(strtolower(strip_tags($actions)));
$actions = strip_tags(trim($actions));
$query = "INSERT INTO Wishlist (productID,wishlist)
VALUES ('$productID','$actions')";
$result = mysql_query($query)
or die ("Can't find database!!");
echo "Item displayed below has been added to our database: <br>
<ul>
<font face=\"Verdana\" color=\"#E5E5E5\" font
size=\"-1\"><b><li>item 1:</b> $productID \n </font>
<font face=\"Verdana\" color=\"#E5E5E5\" font
size=\"-1\"><b><li>item 2:</b> $actions </font>";
echo "</ul>";
?>
can someone please help im just completely clueless as to what is going on now!! thanks