Jump to content

David4321

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

David4321's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Can anyone provide a snip of code that I could insert into the "coupon code" field on a formmail form which has the following effect: on submit form, user goes to the normal payment page (this is already implemented) if coupon code field is filled out with correct code, user is taken to alternate payment page on form submit. Either this or another approach which has the same result is OK. I am a novice coder working in a wysiwyg - I don't REALLY know php at all - I just need a snip I can insert and a clear instruction. Thanks so much for any help.
  2. 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>
  3. 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...
  4. Hello, and thanks in advance for any assistance - My objectives are: A) To create a php form mailer script to use instead of the gdform.php which was provided by godaddy. B) I want the new script to grab the contents of 1 form field (customer name) and add it to the email subject line. ie: I want the email subject to read "Order from: [customer name]" //from "Editbox2" The website is on godaddy, and I've been using their gdform.php script for form mailing. It's fine for basic, but it is in 2 parts - the gdform.php which is in my folder, and the mailer which I cannot view or edit, on their server - so I cannot do the subject feature. As it exists, the email subject is determined in my HTML. I am a complete novice in php. I have moderate knowledge with HTML. I am quick and creative, but I lack background - so please don't make assumptions on what I know. The most helpful answer would be a fully formed script suggestion for me to play with. (maybe you've got one around, and could insert the subject line feature and paste the whole thing here) If it's helpful in any way, here's a link to more info like: The original gdform.php script Variants I've been playing with (unsuccessfully so far) The HTML line which now posts the form and defines the email subject line http://www.happyfoodscafe.net Thanks so much again for any assistance
  5. Hi All, Please don't be intimidated - I know I left a lot of information below. I hoped it would make it easier. I think this should be really simple for the right person. A) I just need a basic form mailer script. B) I'd like it if it could grab a bit of data from the form and add it to the subject line. Thanks again for any assistance.
  6. Hello, and thanks in advence for any assistance - I have a website on godaddy, and I've been using their gdform.php script for form mailing. It is in 2 parts - the gdform.php which is in my folder, and the mailer which I cannot view or edit, on their server. As it exists, the email subject is determined in my html, and the mailto address was entered in godaddy control panel. My objective: A) To create a php form mailer script which will replace the gdform entirely. B) I want new script to grab the contents of 1 form field (customer name) and add it to the emial subject line. ie: I want the email subject to read "Order from: 'customer name'" //from "Editbox14" I am a complete novice in php. I have moderate knowledge with HTML. I am quick and creative, but I lack background - so please don't make assumptions on what I know. Since this is a short script, the most helpful would be fully formed script suggestions for me to play with. (doctor mine below) ----------------------------------------------------------------- Here is the html line which posts the form and defines the email subject line: <form name="Form1" method="post" action="http://www.mywebsite.com/test/mmcform.php" enctype="multipart/form-data" id="Form1" onsubmit="return ValidateForm1(this)" ><input type="hidden" name="redirect" value="purchase.html"><input type="hidden" name="subject" value="Order From:"> ----------------------------------------------------------------- Here is the existing gdform.php: <?php $request_method = $_SERVER["REQUEST_METHOD"]; if($request_method == "GET"){ $query_vars = $_GET; } elseif ($request_method == "POST"){ $query_vars = $_POST; } reset($query_vars); $t = date("U"); $file = $_SERVER['DOCUMENT_ROOT'] . "/../data/gdform_" . $t; $fp = fopen($file,"w"); while (list ($key, $val) = each ($query_vars)) { fputs($fp,"<GDFORM_VARIABLE NAME=$key START>\n"); fputs($fp,"$val\n"); fputs($fp,"<GDFORM_VARIABLE NAME=$key END>\n"); if ($key == "redirect") { $landing_page = $val;} } fclose($fp); if ($landing_page != ""){ header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page"); } else { header("Location: http://".$_SERVER["HTTP_HOST"]."/"); } ?> -------------------------------------------------------------------- Here is a variant I've been modifying and testing (with no success so far) (I changed the script name to mmcform.php, and replaced all references to gdform with mmcform in both php and html.) <?php $request_method = $_SERVER["REQUEST_METHOD"]; if($request_method == "GET"){ $query_vars = $_GET; } elseif ($request_method == "POST"){ $query_vars = $_POST; } reset($query_vars); $t = date("U"); $to ="myemail@email"; $from = $_POST['Editbox14']; $subject ="Order from:" . $_POST['Editbox14']; mail($to ,$from , $subject, $message) $message .= '$_POST['Editbox1'] $message .= '$_POST['Editbox2'] $message .= '$_POST['Editbox14'] $file = $_SERVER['DOCUMENT_ROOT'] . "/../data/gdform_" . $t; $fp = fopen($file,"w"); while (list ($key, $val) = each ($query_vars)) { fputs($fp,"<MMCFORM_VARIABLE NAME=$key START>\n"); fputs($fp,"$val\n"); fputs($fp,"<MMCFORM_VARIABLE NAME=$key END>\n"); if ($key == "redirect") { $landing_page = $val;} } fclose($fp); if ($landing_page != ""){ header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page"); } else { header("Location: http://".$_SERVER["HTTP_HOST"]."/"); } mail($to,$from, $subject, $message) if(!mail){ echo 'Message Not sent!'; } echo 'Message was sent!'; ?> Thanks so much again for any assistance
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.