David4321 Posted March 4, 2009 Share Posted March 4, 2009 This site has very simple product pages (nothing but images and buy now button) which display within an inline frame on the catalog page in response to the user choices. Clicking the buy now button takes user to the order form page. The order form sends form mail upon submission. (currently using godaddy gdform.php) I need to get the product selection data (just the item #) from the product page where the user clicks the button, to be included on the existing form mail that goes out upon submission of the order form on the next page. How can I get the data from the product page to the order form page? (or otherwise be made a part of the data sent on the existing form mail) I know I've seen this before: you fill out something in a form on one page, and when you continue, the next page knows what you entered, or has it pre-filled in. I'm thinking maybe the item # could be sent to a hidden field on the actual order form... or ??? I don't actually know any php, mostly html. Please respond through providing info about what method might usually be used, and if possible a complete script, a link to one, or the right search terms for me to find one. If I'm on the wrong track, please let me know if there is a better method than php. Thanks... Quote Link to comment Share on other sites More sharing options...
tivrfoa Posted March 4, 2009 Share Posted March 4, 2009 you need to look for tutorials http://www.w3schools.com/php/php_forms.asp Quote Link to comment Share on other sites More sharing options...
brentech Posted March 4, 2009 Share Posted March 4, 2009 Is the item # coming from a form element such as a <select> box? Just not sure what method you're using to send that data to the next page. Getting the info into a field on the next page is pretty simple though. as easy as having the form on next page do something like : <input type="hidden" name="itemnumber" value="<?php echo "$item_num"; ?>" /> Would just need to see what you're working with or get a better description of where that info is coming from to flesh it out. It is a pretty simple process though. Just look at some tutorials of php forms. Quote Link to comment Share on other sites More sharing options...
David4321 Posted March 5, 2009 Author Share Posted March 5, 2009 Thanks, that is good. This is exactly what I'm asking about: HOW to move the information from one page to the next. I don't know any methods to use. I'm in a wysiwyg and I know html, but no php. I can copy code scraps, and even adapt them, but I don't know the method. I'm imagining there is some little scrap to put in the product page button form to send the item # to the php page; then the php page itself, to turn it around and send it to the real order form; then a scrap for the hidden field in the order form to ask for the item # from the php page. Have I got this straight? Can you provide or direct me to any of these scraps? Each product page has only 1 product (they display in an inline frame on the catalog page) so the item number can be there in any way. It must be in the page, not entered by the user. At present the buy now button submits a small form. There's literally nothing on the page but the product images, and a rollover image of the buy now button on a little form. Each item page is like this, and displays in an iframe on the catalog page. The button has an internal link to the order page. I haven't entered any variables into the form yet - that's what I'm doing here. I haven't inserted the item # anywhere yet either, I assumed it would be in the php. Thanks so much for your help. Here's the code from the draft I'm working on: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Untitled Page</title> <style type="text/css"> div#container { width: 376px; position: relative; margin-top: 0px; margin-left: auto; margin-right: auto; text-align: left; } body { text-align: center; margin: 0; } </style> <style type="text/css"> a:visited { color: #0000FF; } a:active { color: #0000FF; } </style> <style type="text/css"> img { behavior: url("pngfix.htc"); } </style> </head> <body bgcolor="#000000" text="#FFFFFF" style="background-position:center top ;"> <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> <div id="wb_Image1" style="overflow:hidden;position:absolute;left:16px;top:17px;z-index:1" align="left"> <img src="images/B-greenleaf-A3_340.jpg" id="Image1" alt="" align="top" border="0" style="width:340px;height:195px;"></div> <div id="wb_Image2" style="overflow:hidden;position:absolute;left:16px;top:227px;z-index:2" align="left"> <img src="images/B-red-A3-L_340.jpg" id="Image2" alt="" align="top" border="0" style="width:340px;height:195px;"></div> <div id="wb_RollOver1" style="position:absolute;left:41px;top:450px;width:290px;height:70px;z-index:3" align="left"> <script language="JavaScript" type="text/javascript"> <!-- RollOver1 = new Image(); RollOver1.src = "images/Buy-Now-buttonRG-roll.png"; //--> </script> <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> </div> </div> </body> </html> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.