Hi all i need some advice.
I have created a (form) buy button on my site which passes the
hidden variable $product - $product is the full name of the product.
The problem is that when you press the buy button the actual information that is sent in the variable $product is shortened to one word.
I have a running example if you want to test it. Press the buy button then look at the cart details on the left you will notice that the name is shortened to one word.
http:www.globallifeline.com/testindex.php
what i am looking for is a way to code the buy button or script so that the hidden value passed is actually the full name.
Here's The Actual Code
echo "<form name=\"form2\" method=\"post\" action=\"productadd.php\">";
echo "<input name=\"Submit2\" type=\"submit\" class=\"BuyButton\" value=\" Buy Item\">";
echo "<input name=\"product\" type=\"hidden\" value=".$myrow["product"].">";
echo "<input name=\"price\" type=\"hidden\" value=".$myrow["price"].">";
echo "<input name=\"productnumber\" type=\"hidden\" value=".$myrow["productnumber"].">";
echo "<input name=\"rewardpoints\" type=\"hidden\" value=".$myrow["rewardpoints"].">";
echo "</form></td>";
# The Fields Are Sent To The Add To Cart Script Is Below
if (isset($HTTP_SESSION_VARS['orderid']))
{
$orderid = $HTTP_SESSION_VARS['orderid'];
$product = $HTTP_POST_VARS['product'];
$price = $HTTP_POST_VARS['price'];
$productnumber = $HTTP_POST_VARS['productnumber'];
$rewardpoints = $HTTP_POST_VARS['rewardpoints'];
echo $orderid;
echo $product;
$db = mysql_connect ('', '', '');
mysql_select_db ('');
$sql = "INSERT INTO productsordered VALUES ('".$orderid."','".$product."', '".$price."', '".$productnumber."', '".$rewardpoints."')";
$result = mysql_query($sql);
echo "Your Product Has Been Added To Your Cart";
}
if (!isset($HTTP_SESSION_VARS['orderid']))
{
} ?>
Any Help Would Be Great. (Oh and an opinion on the look of the site would be great also)
Thanks