David,
Is below what the user clicks on to select an item?
Code:
<a href="./order.html" target="_parent">
<img src="images/Buy-Now-buttonRG.png" id="RollOver1" width="290" height="70" alt="" border="0" onMouseOver="this.src='images/Buy-Now-buttonRG-roll.png'" onMouseOut="this.src='images/Buy-Now-buttonRG.png'">
</a>
What is this:
Code:
<div id="container">
<div id="wb_Form1" style="position:absolute;left:19px;top:440px;width:342px;height:91px;z-index:0" align="left">
<form name="Form_selection" method="post" action="orderform.php" enctype="text/plain" id="Form1" >
<input name="item" type="hidden" value="item-test">
<input name="order" type="submit" value="Submit">
</form>
</div>
Once on the order page, you only need an item number to complete the order, right?
I would pass the item number in the URL. You can do this one of two ways.
1) Use an HTML form where:
<form action="orderform.php" method="get">
<input type="hidden" name="item_number" value="123456" />
2) Attach the item number to the URL in the product selection link:
<a href="/orderform.php?item_number=123456">Click here to buy</a>
Either way, on your orderform page, you will need to get the item_number from the URL and place it into the orderform.
You can do that like this:
PHP Code:
<?php
// orderform.php
// Make sure item_number exists
if ( $_GET['item_number'] == '' ) {
// THERE IS NO ITEM NUMBER
// Need to handle this possibility
// You should also do some other validation of the item number
}
$item_number = $_GET['item_number'];
Now you can use $item_number as a variable in your orderform.
Perhaps put it in a hidden input field as value="<?php echo $item_number; ?>"
Hope this helps.
Good luck,
J
Bookmarks