tadroptopgirl Posted July 14, 2012 Share Posted July 14, 2012 I am trying to figure out how to do this. I want to do a discount to the listed price on the website. We can not advertise for lower the msrp but we want to give discounts.This is the Main file. I want to be able to put a code into the box and validate the code to bring up the first button(if statement) for paypal. if nothing is entered I want it to be the second button(else statement)coupontest.php This is the coupon checker to validate the coupon code. Yes the coupon is jamey just for this test.codechecker.php can someone please help? Link to comment Share on other sites More sharing options...
niche Posted July 14, 2012 Share Posted July 14, 2012 (edited) Please post your code in a code box or provide a link to your site. Some my just download your scripts, but the first sentence describes the way the site should work. Downloading unknown files is never a good idea. Edited July 14, 2012 by niche Link to comment Share on other sites More sharing options...
tadroptopgirl Posted July 14, 2012 Author Share Posted July 14, 2012 Here is the link www.notnormalenterprises.com/coupontest.php coupontest.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Not Normal Enterprises</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="Description" content="Not Normal Enterprises LLC is a AMSOIL dealer and reseller of emergancy and warning lights." /> <meta name="Description" content="Jamey, Jacey, McKinley independent authorized Amsoil Dealers provide quality Amsoil synthetic motor oil products in Florida. If you want to buy Amsoil products, visit the Amsoil Online Store!"> <meta name="Keywords" content="amsoil dealers, amsoil oil 2f petroleum product dealers, find amsoil dealers, amsoil dealers Florida, amsoil dealers FL, amsoil dealers in, amsoil dealer, amsoil dealer locator, independent amsoil dealer, amsoil dealer business opportunity, amsoil dealer FL, authorized amsoil dealer, buy amsoil, buy amsoil online, buy+amsoil, buy amsoil synthetic oil, amsoil buy where, buy amsoil+, buy amsoil products, where to buy amsoil, amsoil buy, amsoil where to buy, amsoil online, amsoil+online, amsoil online store, amsoil online+, amsoil online cheap, visit the amsoil online store, amsoil synthetic oil, amsoil motor oil, amsoil synthetic motor oil, amsoil motorcycle oil, synthetic oil amsoil, amsoil 10w40 motorcycle oil retailer, amsoil oil, amsoil motor oil synthetic, buying amsoil engine oil, synthetic motor oil, best synthetic motor oil, synthetic motor oil comparison, motor oil synthetic, synthetic+motor+oil"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <META Name="Author" Content="lube-direct"><META Name="Robots" Content="index,follow"><META Name="Googlebot" Content="index,follow"><meta name="Keywords" content="not normal enterprises, amsoil dealer, dealer, lights, emergancy lights, warning lights, can-am, frame, reinforcemnt" /><link href="../css/index.css" rel="stylesheet" type="text/css" /><link href="../css/simplenavbarscripts.css" rel="stylesheet" type="text/css" /><link href="../css/slimbox2.css" rel="stylesheet" type="text/css" /><link href="../css/special.css" rel="stylesheet" type="text/css" /><script type="text/javascript"> (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })();</script>Not Normal Enterprises LLC • 71 East Geneva Street • Ocoee FL 34761 •</address></div></div></div></body></html> <script type="text/javascript">function showHint(str){if (str.length==0) { document.getElementById("txtHint").innerHTML=""; return; }if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("txtHint").innerHTML=xmlhttp.responseText; } }xmlhttp.open("GET","couponchecker.php?code="+str,true);xmlhttp.send();}</script> <script src="../js/simplenavbarscripts.js" language="JavaScript" type="text/javascript"></script><script src="../js/jquery.min.js" language="JavaScript" type="text/javascript"></script><script src="../js/slimbox2.js" language="JavaScript" type="text/javascript"></script><script type="text/javascript">//<![CDATA[ <!-- var images = new Array(); var image1 = new Image(); image1.src = "../images/clear1.png"; images.push(image1); var image2 = new Image(); image2.src = "../images/clear2.png"; images.push(image2); var image3 = new Image(); image3.src = "../images/clear3.png"; images.push(image3); var image4 = new Image(); image4.src = "../images/clear4.png"; images.push(image4); //--> //]]></script><style type="text/css">/*<![CDATA[*/h1.c1 {color: red}/*]]>*/</style> <style type="text/css">/*<![CDATA[*/div.c2 {text-align: center}div.c1 {text-align: left}/*]]>*/</style></head><body><div id="layer-wrapper"><div id="logo"><img src="../images/logo.png" alt="Not Normal Enterprises" /></div><div class="c1" id="header"><div id="leftlogo"><a href="../index.html"><img src="../images/leftlogo.jpg" alt="" /></a></div></div><div class="mynavbar"><a class="navbartitle" id="t1" href="index.php" name="t1">Home</a> <a class="navbartitle" id="t2" href="" onmouseout="HideItem('statelaws_submenu');" onmouseover="ShowItem('statelaws_submenu');" name="t2">Florida Statutes</a> <a class="navbartitle" id="t3" href="" onmouseout="HideItem('products_submenu');" onmouseover="ShowItem('products_submenu');" name="t3">Products</a> <a class="navbartitle" id="t5" href="http://www.notnormalmotorsports.com" name="t5">Amsoil</a> <a class="navbartitle" id="t4" href="" onmouseout="HideItem('aboutus_submenu');" onmouseover="ShowItem('aboutus_submenu');" name="t4">About Us</a><div class="submenu submenubox" id="otherproduct_submenu" onmouseover="ShowItem('otherproduct_submenu');" onmouseout="HideItem('otherprduct_submenu');"><ul><li><a href="http://www.notnormalmotorsports.com" class="submenulink">Not Normal Motorsports</a></li></ul></div><div class="submenu submenubox" id="products_submenu" onmouseover="ShowItem('products_submenu');" onmouseout="HideItem('products_submenu');"><ul><li><a href="/lights/index.php" class="submenlink">Lights</a></li><li><a href="/equipment/index.php" class="submenlink">Equipment</a></li><li><a href="/Vehicles/index.php" class="submenlink">Our Vehilces</a></li></ul></div><div class="submenu submenubox" id="statelaws_submenu" onmouseover="ShowItem('statelaws_submenu');" onmouseout="HideItem('statelaws_submenu');"><ul><li><a href="flstats/3162397.php" class="submenlink">316.2397</a></li><li><a href="flstats/3162398.php" class="submenlink">316.2398</a></li><li><a href="flstats/3162399.php" class="submenlink">318.2399</a></li></ul></div><div class="submenu submenubox" id="aboutus_submenu" onmouseover="ShowItem('aboutus_submenu');" onmouseout="HideItem('aboutus_submenu');"><ul><li><a href="AboutUs.php" class="submenlink">About Us</a></li><li><a href="Contactus.php" class="submenlink">Contact Us</a></li><li><a href="TermsandConditions.html" class="submenlink">Terms and Conditions</a></li></ul></div></div><div class="c2" id="content"><!-- Weekly Specials POST--><div class="info c2"><div id="infotitle">Site Under Construction</div><p><font size="+5" color="#0099CC">Site is under construction. Some pages may not work. Please check back in the future. Sorry for any inconvenience</font></p></div></div><div class="c1" id="content"><div class="info c2"><div id="infotitle">Coupon Code Test</div><?php if (!$_REQUEST){ ?> <script type="text/javascript"> window.onLoad = showHint('none');</script> <form method="get" action="<?php $_SERVER["PHP_SELF"] ?>">Coupon Code: <input type="text" onkeyup="showHint(this.value)" name="code" id="code_box" /></form> <div id="txtHint"></div> <?php } else { ?><script type="text/javascript"> window.onLoad = showHint('<?php echo $_REQUEST["code"] ?>');</script> <form method="get" action="<?php $_SERVER["PHP_SELF"] ?>">Coupon Code: <input type="text" onkeyup="showHint(this.value)" name="code" id="code_box" value="<?php echo $_REQUEST["code"]; ?>" /></form> <div id="txtHint"></div> <?php}?></div></div><!--END WEEKLY SPECIALS POST--><!--Monthly Specials Post--> <div class="c2" id="footer"><img src="../images/clear1.png" name="slide" alt="Brands" id="slide" /> <script type="text/javascript">//<![CDATA[ <!-- var step = 0; //variable that will increment through the images function slideit() { //if browser does not support the image object, exit. if (!document.images) return; document.images.slide.src = images[step].src; if (step < images.length - 1) step++; else step = 0; } //call function "slideit()" every 2.5 seconds window.setInterval(slideit, 6000); //--> //]]></script><address><!-- Place this tag where you want the +1 button to render --><g:plusone annotation="inline"></g:plusone> <!-- Place this render call where appropriate --> couponchecker.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title></head> <body><?phpif ($_REQUEST["code"] == "jamey") {echo "<form target=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">";echo "<input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">";echo "<input type=\"hidden\" name=\"hosted_button_id\" value=\"HWVCBQPA4D9K2\">";echo "<input type=\"image\" src=\"https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\">";echo "<img alt=\"\" border=\"0\" src=\"https://www.paypalobjects.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">";echo "</form>";} elseif (empty($_REQUEST["code"]) || ($_REQUEST[""] == null)) {echo "<form target=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">";echo "<input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">";echo "<input type=\"hidden\" name=\"hosted_button_id\" value=\"VAGSX4FWKS2Z2\">";echo "<input type=\"image\" src=\"https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\">";echo "<img alt=\"\" border=\"0\" src=\"https://www.paypalobjects.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">";echo "</form>";}?></body></html> Link to comment Share on other sites More sharing options...
Don E Posted July 14, 2012 Share Posted July 14, 2012 (edited) From the looks of it, it looks like you want when the user first comes to the page you want the innerHTML of textHint to be blank but instead what you can do is just have it return there. In other words, have it like this instead in the beginning of the showHint() function: if (str == "none") { return; } Then in the couponchecker.php page, you can try this: <?php if ($_GET["code"] == "jamey") {echo "<form target=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">";echo "<input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">";echo "<input type=\"hidden\" name=\"hosted_button_id\" value=\"HWVCBQPA4D9K2\">";echo "<input type=\"image\" src=\"https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\">";echo "<img alt=\"\" border=\"0\" src=\"https://www.paypalobjects.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">";echo "</form>";} elseif (empty($_GET["code"]) || ($_GET == null)) { // I used $_GET here instead of $_REQUESTecho "<form target=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">";echo "<input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">";echo "<input type=\"hidden\" name=\"hosted_button_id\" value=\"VAGSX4FWKS2Z2\">";echo "<input type=\"image\" src=\"https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\">";echo "<img alt=\"\" border=\"0\" src=\"https://www.paypalobjects.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">";echo "</form>";} ?> If the user enters "jamey" the first "if" statement should be executed, if blank is submitted then the elseif is executed thus populating the textHint div depending on what the user entered. Also to note that if the user enters 0 (zero), then elseif statement will be executed as well because of how the empty() function works. Hopefully this was helpful. Edit: I just used firebug on the link you provided and the console is displaying a 404 Not Found when attempting to call couponchecker.php via ajax. Edited July 14, 2012 by Don E Link to comment Share on other sites More sharing options...
Guest So Called Posted July 14, 2012 Share Posted July 14, 2012 What does the OP want to happen if the "code" is not "jamey" but is not empty either? No form at all? Link to comment Share on other sites More sharing options...
tadroptopgirl Posted July 14, 2012 Author Share Posted July 14, 2012 If no code is entered I want it to go to the else if button the original price of the item Discounted item is first button original price item is last button And can I rename codechecker.php cause I would like to have a few items dicounted? Link to comment Share on other sites More sharing options...
tadroptopgirl Posted July 14, 2012 Author Share Posted July 14, 2012 When I put in jamey and hit enter it does not show anything, it reloads the page but does not bring anything up. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Not Normal Enterprises</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="Description" content="Not Normal Enterprises LLC is a AMSOIL dealer and reseller of emergancy and warning lights." /><meta name="Description" content="Jamey, Jacey, McKinley independent authorized Amsoil Dealers provide quality Amsoil synthetic motor oil products in Florida. If you want to buy Amsoil products, visit the Amsoil Online Store!"><meta name="Keywords" content="amsoil dealers, amsoil oil 2f petroleum product dealers, find amsoil dealers, amsoil dealers Florida, amsoil dealers FL, amsoil dealers in, amsoil dealer, amsoil dealer locator, independent amsoil dealer, amsoil dealer business opportunity, amsoil dealer FL, authorized amsoil dealer, buy amsoil, buy amsoil online, buy+amsoil, buy amsoil synthetic oil, amsoil buy where, buy amsoil+, buy amsoil products, where to buy amsoil, amsoil buy, amsoil where to buy, amsoil online, amsoil+online, amsoil online store, amsoil online+, amsoil online cheap, visit the amsoil online store, amsoil synthetic oil, amsoil motor oil, amsoil synthetic motor oil, amsoil motorcycle oil, synthetic oil amsoil, amsoil 10w40 motorcycle oil retailer, amsoil oil, amsoil motor oil synthetic, buying amsoil engine oil, synthetic motor oil, best synthetic motor oil, synthetic motor oil comparison, motor oil synthetic, synthetic+motor+oil"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><META Name="Author" Content="lube-direct"><META Name="Robots" Content="index,follow"><META Name="Googlebot" Content="index,follow"><meta name="Keywords" content="not normal enterprises, amsoil dealer, dealer, lights, emergancy lights, warning lights, can-am, frame, reinforcemnt" /><link href="../css/index.css" rel="stylesheet" type="text/css" /><link href="../css/simplenavbarscripts.css" rel="stylesheet" type="text/css" /><link href="../css/slimbox2.css" rel="stylesheet" type="text/css" /><link href="../css/special.css" rel="stylesheet" type="text/css" /><script type="text/javascript"> (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })();</script>Not Normal Enterprises LLC • 71 East Geneva Street • Ocoee FL 34761 •</address></div></div></div></body></html><script type="text/javascript">function showHint(str){if (str == "none") { return; }if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("txtHint").innerHTML=xmlhttp.responseText; } }xmlhttp.open("GET","couponchecker.php?code="+str,true);xmlhttp.send();}</script><script src="../js/simplenavbarscripts.js" language="JavaScript" type="text/javascript"></script><script src="../js/jquery.min.js" language="JavaScript" type="text/javascript"></script><script src="../js/slimbox2.js" language="JavaScript" type="text/javascript"></script><script type="text/javascript">//<![CDATA[<!-- var images = new Array(); var image1 = new Image(); image1.src = "../images/clear1.png"; images.push(image1); var image2 = new Image(); image2.src = "../images/clear2.png"; images.push(image2); var image3 = new Image(); image3.src = "../images/clear3.png"; images.push(image3); var image4 = new Image(); image4.src = "../images/clear4.png"; images.push(image4);//-->//]]></script><style type="text/css">/*<![CDATA[*/ h1.c1 {color: red}/*]]>*/</style><style type="text/css">/*<![CDATA[*/ div.c2 {text-align: center} div.c1 {text-align: left}/*]]>*/</style></head><body><div id="layer-wrapper"><div id="logo"><img src="../images/logo.png" alt="Not Normal Enterprises" /></div><div class="c1" id="header"><div id="leftlogo"><a href="../index.html"><img src="../images/leftlogo.jpg" alt="" /></a></div></div><div class="mynavbar"><a class="navbartitle" id="t1" href="index.php" name="t1">Home</a> <a class="navbartitle" id="t2" href="" onmouseout="HideItem('statelaws_submenu');" onmouseover="ShowItem('statelaws_submenu');" name="t2">Florida Statutes</a> <a class="navbartitle" id="t3" href="" onmouseout="HideItem('products_submenu');" onmouseover="ShowItem('products_submenu');" name="t3">Products</a> <a class="navbartitle" id="t5" href="http://www.notnormalmotorsports.com" name="t5">Amsoil</a> <a class="navbartitle" id="t4" href="" onmouseout="HideItem('aboutus_submenu');" onmouseover="ShowItem('aboutus_submenu');" name="t4">About Us</a><div class="submenu submenubox" id="otherproduct_submenu" onmouseover="ShowItem('otherproduct_submenu');" onmouseout="HideItem('otherprduct_submenu');"><ul><li><a href="http://www.notnormalmotorsports.com" class="submenulink">Not Normal Motorsports</a></li></ul></div><div class="submenu submenubox" id="products_submenu" onmouseover="ShowItem('products_submenu');" onmouseout="HideItem('products_submenu');"><ul><li><a href="/lights/index.php" class="submenlink">Lights</a></li><li><a href="/equipment/index.php" class="submenlink">Equipment</a></li><li><a href="/Vehicles/index.php" class="submenlink">Our Vehilces</a></li></ul></div><div class="submenu submenubox" id="statelaws_submenu" onmouseover="ShowItem('statelaws_submenu');" onmouseout="HideItem('statelaws_submenu');"><ul><li><a href="flstats/3162397.php" class="submenlink">316.2397</a></li><li><a href="flstats/3162398.php" class="submenlink">316.2398</a></li><li><a href="flstats/3162399.php" class="submenlink">318.2399</a></li></ul></div><div class="submenu submenubox" id="aboutus_submenu" onmouseover="ShowItem('aboutus_submenu');" onmouseout="HideItem('aboutus_submenu');"><ul><li><a href="AboutUs.php" class="submenlink">About Us</a></li><li><a href="Contactus.php" class="submenlink">Contact Us</a></li><li><a href="TermsandConditions.html" class="submenlink">Terms and Conditions</a></li></ul></div></div><div class="c2" id="content"><!-- Weekly Specials POST--><div class="info c2"><div id="infotitle">Site Under Construction</div><p><font size="+5" color="#0099CC">Site is under construction. Some pages may not work. Please check back in the future. Sorry for any inconvenience</font></p></div></div><div class="c1" id="content"><div class="info c2"><div id="infotitle">Coupon Code Test</div><?phpif (!$_REQUEST){?><script type="text/javascript"> window.onLoad = showHint('none');</script><form method="get" action="<?php $_SERVER["PHP_SELF"] ?>">Coupon Code: <input type="text" onkeyup="showHint(this.value)" name="code" id="code_box" /><input type="submit" /></form><div id="txtHint"></div><?php} else {?><script type="text/javascript"> window.onLoad = showHint('<?php echo $_REQUEST["code"] ?>');</script><form method="get" action="<?php $_SERVER["PHP_SELF"] ?>">Coupon Code: <input type="text" onkeyup="showHint(this.value)" name="code" id="code_box" value="<?php echo $_REQUEST["code"]; ?>" /></form><div id="txtHint"></div><?php}?></div></div><!--END WEEKLY SPECIALS POST--><!--Monthly Specials Post--><div class="c2" id="footer"><img src="../images/clear1.png" name="slide" alt="Brands" id="slide" /> <script type="text/javascript">//<![CDATA[<!-- var step = 0; //variable that will increment through the images function slideit() { //if browser does not support the image object, exit. if (!document.images) return; document.images.slide.src = images[step].src; if (step < images.length - 1) step++; else step = 0; } //call function "slideit()" every 2.5 seconds window.setInterval(slideit, 6000);//-->//]]></script><address><!-- Place this tag where you want the +1 button to render --><g:plusone annotation="inline"></g:plusone><!-- Place this render call where appropriate --> Link to comment Share on other sites More sharing options...
Guest So Called Posted July 14, 2012 Share Posted July 14, 2012 (edited) If no code is entered I want it to go to the else if button the original price of the item Discounted item is first button original price item is last buttonThen you should consider this:<?php if ($_GET["code"] == "jamey") {echo "<form target=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">";echo "<input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">";echo "<input type=\"hidden\" name=\"hosted_button_id\" value=\"HWVCBQPA4D9K2\">";echo "<input type=\"image\" src=\"https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\">";echo "<img alt=\"\" border=\"0\" src=\"https://www.paypalobjects.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">";echo "</form>";//////} elseif (empty($_GET["code"]) || ($_GET == null)) {} else { // unconditional else instead of being based upon empty or nullecho "<form target=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">";echo "<input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">";echo "<input type=\"hidden\" name=\"hosted_button_id\" value=\"VAGSX4FWKS2Z2\">";echo "<input type=\"image\" src=\"https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\">";echo "<img alt=\"\" border=\"0\" src=\"https://www.paypalobjects.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">";echo "</form>";}?> Or this: <?php$hosted_value = ($_GET["code"] == "jamey") ? "HWVCBQPA4D9K2" : "VAGSX4FWKS2Z2";echo "<form target=\"paypal\" action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\"><input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\"><input type=\"hidden\" name=\"hosted_button_id\" value=\"$hosted_value\"><input type=\"image\" src=\"https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online!\"><img alt=\"\" border=\"0\" src=\"https://www.paypalobjects.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">";</form>";}?> Edited July 15, 2012 by So Called Link to comment Share on other sites More sharing options...
tadroptopgirl Posted July 15, 2012 Author Share Posted July 15, 2012 does the form need to do anything other then this <form method="get" action="<?php $_SERVER["PHP_SELF"] ?>">Coupon Code: <input type="text" onkeyup="showHint(this.value)" name="code" id="code_box" /></form> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now