Jump to content

This code won't run


frizzo

Recommended Posts

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>

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.