Jump to content

frizzo

Members
  • Posts

    18
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

frizzo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Actually, the purpose of this was to save me from having to make multiple software applications for different distributors, so I could offer custom homepages to each distributor through one single app. I figured that I would hardcode all the variables into one single software application, and then let the PHP code work as the shifter between the correct pages to be displayed through each distributor.
  2. Hi, I am trying to capture multiple variables in a URL to cause a redirect to other URL's. This is what I have: http://mysite.com?variable1=7 <?php if ($_GET['variable1'] == '7') { header('Location: http://www.mysite.com/....'); exit(); } // default location header('Location: http://mysite.com/...'); exit(); ?> This is what I want to be able to do: http://mysite.com?variable1=7&track=2&ref=5 How can this code be modified this to recognize and accept such multiple variables, and redirect accordingly? Thanks.
  3. So like this? if ($_GET['product'] == 'game1') && ($_GET == ['gamex'])
  4. I have this code: if ($_GET['product'] == 'game1') { header('Location: http://URL_HERE'); exit(); } How can I add an extra variable, such as a keyword to be caught from the URL the string, like: http://siteurl.com?product=game1&kw=gamex Thanks.
  5. Yeah even with adding the echo it still posts a blank page. I wonder if there is an easier way to create a code to function the same?
  6. Ok, "paymodal" is to catch a radio button variable from a previous page which determines the price of an item. "btn_cc" is the id of the submit button on that page. The purpose of the script is to grab the "paymodal" and redirect to different payment links according to which variable is passed to this script.
  7. When I pass the variables to this script, it returns a blank page.
  8. Hi, can't seem to get this payment script to work, can someone please point out any spotted errors within the code? Thanks. <?php $paymodal=${"paymodal"}; $btn_cc=${"btn_cc"}; // --------------------------------------------- if ($btn_cc=="Credit Card") { if ($paymodal=="lifetime") { if ($_POST["txtOpt1"]=="ON") { if ($_POST["txtOpt2"]=="ON") { // -------------------------------------------- $54.85 header("Location: http://25.URL/?detail=&email=" . $_POST["email"]); } else { // -------------------------------------------- $44.90 header("Location: http://24.URL/?detail=&email=" . $_POST["email"]); } } else { if ($_POST["txtOpt2"]=="ON") { // -------------------------------------------- header("Location: http://24.URL/?detail=&email=" . $_POST["email"]); } else { // -------------------------------------------- $34.95 header("Location: http://23.URL/?detail=&email=" . $_POST["email"]); } } } else if ($paymodal=="2yr") { if ($_POST["txtOpt1"]=="ON") { if ($_POST["txtOpt2"]=="ON") { // -------------------------------------------- $49.78 header("Location: http://28.URL/?detail=&email=" . $_POST["email"]); } else { // -------------------------------------------- $39.83 header("Location: http://27.URL/?detail=&email=" . $_POST["email"]); } } else { if ($_POST["txtOpt2"]=="ON") { // -------------------------------------------- header("Location: http://27.URL/?detail=&email=" . $_POST["email"]); } else { // -------------------------------------------- $29.88 header("Location: http://26.URL/?detail=&email=" . $_POST["email"]); } } } else if ($paymodal=="1yr") { if ($_POST["txtOpt1"]=="ON") { if ($_POST["txtOpt2"]=="ON") { // -------------------------------------------- $39.85 header("Location: http://31.URL/?detail=&detail=&email=" . $_POST["email"]); } else { // -------------------------------------------- $29.90 header("Location: http://30.URL/?detail=&email=" . $_POST["email"]); } } else { if ($_POST["txtOpt2"]=="ON") { // -------------------------------------------- header("Location: http://30.URL/?detail=&email=" . $_POST["email"]); } else { // -------------------------------------------- $19.95 header("Location: http://29.URL/?detail=&email=" . $_POST["email"]); } } } else { header("Location: http://13.URL/?detail=&email=" . $_POST["email"]); } } ?> <form name="paymethod" action="<? echo $_SERVER["PHP_SELF"];?>" method="post"></strong>
  9. Is it possible to submit the same form to two different locations using PHP? That way I could still send data to the database while retaining the hidden values on the redirect page.
  10. What I figured... I'll leave it open for a bit in case anyone else has any ideas...
  11. I am using the $_POST['values'] and $_GET['values'] to pass hidden text field variables from page to page. I can't figure out how to pass and return those values to a redirect page after the form posts to a database. Would I need to modify files inside the software that inserts the values into the database, because it is the software itself that handles the redirect. I am not sure this can be done through PHP, but I want to make sure. Any help is appreciated....
  12. That worked out great. Thanks a bunch. I am passing form data to Clickbank, so ?detail= is for the product detail.
  13. That's where I get confused. Like this? header("Location: http://......./?detail=&email=&name=" . $_POST["email"]); . $_POST["name"]); Yea, the URL and detail were removed to simplify the code.
  14. I want to add another field to the post of this header redirect. header("Location: http://......./?detail=&email=" . $_POST["email"]); To add a "name" field, for example. How can I do that? Thanks.
×
×
  • 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.