Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Information From Shopping Cart To Another Page

Status
Not open for further replies.

likelylad

IS-IT--Management
Jul 4, 2002
388
GB
I have an AJAX shopping cart from
I have adapted the page to what I needed successfully, however I would like to get the information in the shopping cart and sent it to a php page.

The following is a snippet of code from the shopping cart page:

Code:
	<div id="rightColumn">
<form name="input" action="runquery.php" method="post">
		<!-- Shopping cart It's important that the id of this div is "shopping_cart" -->
		<div id="shopping_cart">
			<strong>Products Not In Query</strong>	
			<table id="shopping_cart_items">
				<tr>
					<th></th>
					<th>Description</th>
					<th></th>
				</tr>
				<!-- Here, you can output existing basket items from your database 
				One row for each item. The id of the TR tag should be shopping_cart_items_product + productId,
				example: shopping_cart_items_product1 for the id 1 -->
				
				
			</table>
			
			<div></div>
		</div>
<input type="submit" value="Submit" /><br />
</form>
	</div>
	
	<div class="clear"></div>
	
</div>


The Code I have tried on the following page is as follows:

Code:
<?php

$test=$_POST['shopping_cart_items'];
echo $test;
?>

Thanking in advance for any help received
 
Not enough information:

Is there a form element (textbox, hidden field, checkbox) named "shopping_cart_items" anywhere?

How is it getting its values?





----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
i think it's all an ajax thing from looking at the link (interestingly the example page has broken functionality). you (the OP) needs to create a method for returning the contents of the shopping cart database in a suitably rendered format, and then a javascript hook to call the data in to the relevant html element.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top