5 Replies - 334 Views - Last Post: 08 December 2011 - 07:43 PM Rate Topic: -----

#1 mindiapolis  Icon User is offline

  • D.I.C Head

Reputation: -4
  • View blog
  • Posts: 175
  • Joined: 31-October 11

thank you page not displaying `

Posted 08 December 2011 - 12:22 PM

Hi, can someone help me understand why the thank you page isn't displaying? When I hit submit the same form comes back up.

<?php        
logo();
navBar();
if (!isset($submit))
{
?>
<form action="<?php echo $PHP_SELF;?>" method="post" name="checkOut">
First name:<br />
    <input name="fname" type="text" size="15" />
<input name="reset" type="submit" value="Cancel Order" /> </td><td> <input name="Submit" type="submit" value="Order Treats!" />
</form>
<?php
}
else
{
echo "Thank you for your information.  Our records show that your name is $fname, your cell number is $cellNum and your email is $email.   \n";
}
?>



Is This A Good Question/Topic? 0
  • +

Replies To: thank you page not displaying `

#2 Jstall  Icon User is offline

  • Lurker
  • member icon

Reputation: 434
  • View blog
  • Posts: 1,042
  • Joined: 08-March 09

Re: thank you page not displaying `

Posted 08 December 2011 - 12:26 PM

Hi,

if (!isset($submit))



I don't see you setting $submit anywhere. So that will always evaluate to true.
Was This Post Helpful? 0
  • +
  • -

#3 codeprada  Icon User is offline

  • Changed Man With Different Priorities
  • member icon

Reputation: 947
  • View blog
  • Posts: 2,355
  • Joined: 15-February 11

Re: thank you page not displaying `

Posted 08 December 2011 - 12:27 PM

Well you've got if $submit is not set then show the form. From what I see here $submit isn't set anywhere. I believe however you're trying to check if the form was submitted so you'll have to check if $_POST['Submit'] is set.
Was This Post Helpful? 0
  • +
  • -

#4 mindiapolis  Icon User is offline

  • D.I.C Head

Reputation: -4
  • View blog
  • Posts: 175
  • Joined: 31-October 11

Re: thank you page not displaying `

Posted 08 December 2011 - 01:24 PM

so it should be if(isset($_POST['submit '])) {
Was This Post Helpful? 0
  • +
  • -

#5 codeprada  Icon User is offline

  • Changed Man With Different Priorities
  • member icon

Reputation: 947
  • View blog
  • Posts: 2,355
  • Joined: 15-February 11

Re: thank you page not displaying `

Posted 08 December 2011 - 02:01 PM

View Postmindiapolis, on 08 December 2011 - 04:24 PM, said:

so it should be if(isset($_POST['submit '])) {

Only if you want to check if the submit button has been clicked or not.

N.B. Remove the extra space after submit.

This post has been edited by codeprada: 08 December 2011 - 02:01 PM

Was This Post Helpful? 0
  • +
  • -

#6 mindiapolis  Icon User is offline

  • D.I.C Head

Reputation: -4
  • View blog
  • Posts: 175
  • Joined: 31-October 11

Re: thank you page not displaying `

Posted 08 December 2011 - 07:43 PM

This is kind of a complicated situation. I have a website with two forms. One form is a catalog page that the user can select what products they want and upon clicking submit it should take you to the checkout page where you can pay for the order. I have the thank you page code on the checkout page; however, on the catalog page when I select a product and click proceed to checkout, it sends me to the thank you page. Here are the code for both pages. I apologize in advance for the length of the checkout page.

Product page
<?php
session_start();
if(!isset($_SESSION['quantity']))

	{
	  $_SESSION['quantity']=array(); //if there are no quantities selected, the array is empty
	  if(is_array($_POST['quantity']))//if there are items in the cart
	{
	  echo $quantity;
	  header("location: checkOut.php");
	}
	}
require_once("functions.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>
<style type="text/css">
td {
	border-top-style: solid; 
	border-right-style: solid;
	border-bottom-style: solid;
	border-left-style: solid;
	border-top-color: #30C;
	border-right-color: #30C;
	border-bottom-color: #30C;
	border-left-color: #30C;
}
#productCatalog {
	width:400px;   
	margin-right: auto;
	margin-left: auto;
}
</style>
<link href="doggyTreats.css" rel="stylesheet" type="text/css" />
</head>

<body>
<?php
logo();
navBar();
echo "<div id=\"productCatalog\">";
echo "<form action=\"checkOut.php\" method=\"post\" name=\"catalog\">";
  
DatabaseConnection();  

  $query = "SELECT * FROM treats"; 
        $result_set = mysql_query($query) or die(mysql_error());
$i = 0;

        echo "<table>";
        while ($row = mysql_fetch_array($result_set))
        {
			echo"<tr><td width=\"200px\"><img src=\"{$row['product_pic']}\" /></td><td width=\"200px\">{$row['product_title']}.<br /><br />{$row['product_Description']}.<br /> Price:  \${$row['price']}{$row['pricePer']}.<br /><br />Quantity <input name=\"quantity\" type=\"text\" size=\"2\" /></td></tr>";
        }
 		echo "<tr>"; 
			echo "<td><input name=\"submit\" type=\"submit\" value=\"Proceed to Checkout\" />"; 
		echo "</table>";    
		echo "</form>"; 
echo "</div>";
footer();
?>
</body>
</html>




checkout page
<?php
session_start();
require_once("functions.php");
DatabaseConnection();  
$state = $_POST['state'];
$payment = $_POST['payment_Method']; 
$breed = $_POST['breed'];
$ship_state=$_POST['Shipstate']; 
//mysql_select_db("auntievics"); 
mysql_query("INSERT INTO customers (fname, lname, address, city, state, zip, phone, fax, email, re_enter_email, payment_Method, paypal_username, ship_first_name, ship_last_name, ship_address, ship_city, ship_state, ship_zip, ship_email, ship_re_email, pet_name, age, breed, nutritional_needs, special_instructions, product_name, quantity, price, sales_tax, subtotal, shipping_cost, total)
VALUES ('$fname', '$lname', '$address', '$city', '$state', '$zip', '$phone', '$fax', '$email', '$re_enter_email', '$payment', '$paypal_username', '$ship_first_name', '$ship_last_name', '$ship_address', '$ship_city', '$ship_state', '$ship_zip', '$ship_email', '$ship_re_email', '$pet_name', '$age', '$breed', '$nutritional_needs', '$special_instructions', '$product_name', '$quantity', '$price', '$sales_tax', '$subtotal', '$shipping_cost', '$total')"); 
?>
<!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>ordering doggy treats</title>
<style type="text/css">
#order {

	margin-right: auto;
	margin-left: auto;
}
.orderRow{ 
	padding-bottom: 50px;
}
h2 {
	text-align: center;
}

</style>

<link href="doggyTreats.css" rel="stylesheet" type="text/css" />
</head>
<body>
  
<?php        
logo();
navBar();
/*extract ($_POST);
if (!isset($submit))
{*/
?>
<form action="<?php echo $PHP_SELF;?>" method="post" name="checkOut">
<table id="order">
<tr class="orderRow">  
  	<td> First name:<br />
    <input name="fname" type="text" size="15" /></td>
    <td>Last name:  <br />
    <input name="lname" type="text" size="15" maxlength="30" /></td>
    <td>  Address:  <br />  
    <input name="address" type="text" size="30" /></td>
</tr>
<tr class = "orderRow">
 	<td>  City:  <br />
	      <input name="city " type="text" size="15" maxlength="20" />	</td>
	<td>   State:   <br />
           <select name = "state">  <option selected value ="Please choose a state">
			Please choose a state</option>
			<?php states() ?>
			</select>	  </td>   
	<td>  Zip Code:<br />
          <input name="zipcode" type="text" size="5" maxlength="5" />	</td>  
</tr>  
<tr class = "orderRow">
	<td> Phone  <br />  Please include area code <br />  
	    <input name="phone" type="text" size="13" maxlength="13" />	</td>
	<td>  Fax:<br />   
    <input name="" type="text" size="13" maxlength="13" />    </td>
	<td>   Email: <br />  
	<input name="email " type="text" size="15" maxlength="30" />	</td>
</tr>
<tr class = "orderRow">  
     <td>   Please choose method of payment: <br /> 
	   <label>
	       <input type="radio" name="payment_Method " value="money_order" />
	       Money Order </label>
	     <br />
	     <label>
	       <input type="radio" name="payment_Method " value="check" />
	       Check </label>
	     <br />
	     <label>
	       <input type="radio" name="payment_Method " value="PayPal" />
	       PayPal</label>
	   </td>
    <td>PayPal Username <br />
    <input name="PayPal_username" type="text" size="15" maxlength="50" />
    </tr>
<tr>'
	<td colspan = "6">	 <h2>  Shipping Information </h2>

</tr>
<tr class="orderRow">  
  	<td> First name:<br />
    <input name="Shipfname" type="text" size="15" /></td> 
    <td>Last name:  <br />
    <input name="Shiplname" type="text" size="15" maxlength="30" /></td>
    <td>  Address:  <br />  
    <input name="Shipaddress" type="text" size="30" /></td>
</tr>
<tr class = "orderRow">
 	<td>  City:  <br />
	      <input name="Shipcity " type="text" size="15" maxlength="20" />	</td>
	<td>   State:   <br />
          <select name = "Shipstate">  <option selected value ="Please choose a state">
			Please choose a state</option>
			<?php states() ?>
			</select>	  </td>   
	<td>  Zip Code:<br />
          <input name="zipcode" type="text" size="5" maxlength="5" />	</td>  
</tr>  
<tr class = "orderRow">
	<td> Phone  <br />  Please include area code <br />  
	    <input name="Shipphone" type="text" size="13" maxlength="13" />	</td>

	<td>   Email: <br />  
	<input name="Shipemail " type="text" size="15" maxlength="30" />	</td>
</tr>
<tr>
	<td colspan = "6">	 <h2>  Pet Information </h2></td>
</tr>
     <tr>
	  <td>  Name: <br /> 
	      <input name="petName" type="text" size="10" maxlength="20" />	  </td>  
	<td>   Age: <br />
	<select name="age">  
<?php
  for ($age =1; $age <=20; $age ++)
 	{
		print "<option value=\"age\">  $age</option>"; 
	}
?>   
</select></td>   
<td>   Breed:<br />
	<select name = "breed">  <option selected value ="Please choose a breed">
			Please choose a breed </option>
			    <option value = "I don't know" >I don't know </option>
				<option value = "Affernpincher" >Affernpincher </option>
				<option value = "Afghan Hound" >Afghan Hound </option>
				<option value = "Airedale Terrier" > Airedale Terrior</option>
				<option value = "Akita" >  Akita </option>
				<option value = "Alaskan Malamute" >  Alaskan Malamute </option>
				<option value = "Standard American Eskimo Dog"> Standard American Eskimo Dog</option>
				<option value = "Miniature American Eskimo Dog">Miniature American Eskimo 		
                                 Dog</option>
				<option value = "Toy American Eskimo Dog"> Toy American Eskimo Dog</option>
				<option value = "American Foxhound" >  American Foxhound</option>
				<option value = "American Staffordshire Terrier" >  American Staffordshhire                                 Terrier</option>
				<option value = "American Water Spaniel" > American Water Spaniel</option>
				<option value = "Australian Shepherd Dog">  Anatolian Shepherd Dog </option>
				<option value = "Australian Cattle Dog">  Australian Cattle Dog</option>
				<option value = "Australian Shepherd">  Australian Shepherd </option>
				<option value = "Australian Terrier" >  Australia Terrier</option>
				<option value = "Basenji" >  Basenji</option>
				<option value = "Basset Hound" >  Basset Hound </option>
				<option value = "Beagle" >  Beagle</option>
				<option value = "Bearded Collie" >  Bearded Collie</option>
				<option value = "Beauceron" >  Beauceron </option> 
				<option value = "Bedington Terrier">  Bedington Terrier</option>
				<option value = "Belgin Malinois"> Belgin Malinois</option>
				<option value = "Belgian Sheepdog">  Belgian Sheepdog</option>
				<option value = "Belgian Tervuren">  Belgian Tervuren</option>
				<option value = "Bernese Mountain Dog">  Bernese Mountain Dog</option> 
				<option value = "Bichon Frise">  Bichon Frise</option>
				<option value = "Black and Tan Greyhound" >  Black and Tan Greyhound</option>
				<option value = "Black Russian Terrier" >  Black Russian Terrier</option>
				<option value = "Bloodhoung" >  Bloodhound</option>
				<option value = "Border Collie" > Border Collie</option>
				<option value = "Border Terrier"> Border Terrier</option>
				<option value = "Borzoi">  Borzoi</option>
				<option value = "Boston Terrier">  Boston Terrier</option>
				<option value = "Bouvier des Flandres">  Bouvier des Flandres</option>
				<option value = "Boxer">  Boxer</option>
				<option value = "Briard">  Briard</option>
				<option value = "Brittany" >  Brittany</option>
				<option value = "Brussels Griffon" >  Brussels Griffon</option>
				<option value = "Bulldog" > Bulldog</option>
				<option value = "Bullmastiff" > Bullmasttiff</option>
				<option value = "Bull Terrier" >  Bull Terrier</option>
				<option value = "Cairn Terrier" >  Cairn Terrier</option>
				<option value = "Canaan Dog" >  Canaan Dog</option>
				<option value = "Cardigan Welsh Corgi" >  Cardigan Welsh Corgi</option>
				<option value = "Cavalier King Charles Spaniel" >Cavalier King Charles 
                             Spaniel</option>
				<option value = "Chesepeake Bay Retriever" >Chesapeake Bay Retriever</option>
				<option value = "Chilauhua" > Chilauhua</option>
				<option value = "Chinese Created" >  Chinese Crested</option>
				<option value = "Chinese Shar-Pei" >  Chinese Shar-Pei</option> 
				<option value = "Chow Chow" >  Chow Chow</option>
				<option value = "Clumber Spaniel" >  Clumber Spaniel</option>
				<option value = "Cocker Spaniel" >  Cocker Spaniel</option>
				<option value = "Collie" >  Collie</option>
				<option value = "Curly-Coated Retriever" >  Curly-Coated Retriever</option>
				<option value = "Dachshound" >  Dachshund</option>
				<option value = "Dalmation" > Dalmation</option>
				<option value = "Dandle Dimonnt" > Dandie Dinmont Terrier</option>
				<option value = "Doberman Pincher" >  Doberman Pincher</option>
				<option value = "Dogue de Bordeaux" > Dogue de Bordeaux</option>
				<option value = "English Cocker Spaniel" >  English Cocker Spaniel</option>  
				<option value = "English Foxhound" >  English Foxhound</option>
				<option value = "English Setter" >  English Setter</option>
				<option value = "English Springer" > English Springer</option>
				<option value = "English Toy Spaniel" >  English Toy Spaniel</option>
				<option value = "Field Spaniel" > Field Spaniel</option>
				<option value = "Finnish Spitz" >  Finnish Spitz</option>
				<option value = "Flat-Coated Retriever" >  Flat-Coated Retriever</option>
				<option value = "French Bulldog" >  French Bulldog</option>
				<option value = "German Shepherd Dog" > German Shepherd Dog</option>
				<option value = "German Shorthaired Pointer">German Shorthaired Pointer</option>
				<option value = "German Wirehaired Pointer" >  German Wirehaired Pointer </option>
				<option value = "Giant Schnauzer" > Giant Schnauzer</option>
				<option value = "Glen of Imaal Terrier" >  Glen of Imaal Terrier</option>
				<option value = "Golden Retriever" > Golden Retriever</option>
				<option value = "Gorden Setter" > Gorden Setter</option>
				<option value = "Great Dane" > Great Dane</option>
				<option value = "Greater Swiss Mountain Dog" > Greater Swiss Mountain Dog</option>
				<option value = "Great Pyrenees" > Great Pyrenees</option>
				<option value = "Greyhound" > Greyhound</option>
				<option value = "Harrier"  > Harrier</option>
				<option value = "Havanese" >  Havanese</option>
				<option value = "Ibizen Hound" > Ibizen Hound </option>
				<option value = "Irish Setter" >  Irish Setter</option>
				<option value = "Irish Terrier" > Irish Terrier</option>
				<option value = "Irish Water Spaniel"> Irish Water Spaniel</option>
				<option value = "Irish Wolfhound" >  Irish Wolfhound</option>
				<option value = "Italian Greyhound">  Italian Greyhound</option>
				<option value = "Jack Russell Terrier" >  Jack Russell Terrier</option>
				<option value = "Japanese Chin" >  Japanese Chin</option>
				<option value = "Keeshound" >  Keeshound</option>
				<option value = "Kerry Blue TErrier" >  Kerry Blue Terrier</option>
				<option value = "Komondor" > Komondor</option>
				<option value = "Kuvasz" >  Kuvasz</option>
				<option value = "Labradar Retriever" >  Labrador Retriever</option>
				<option value = "Lakeland Terrier" >  Lakeland Terrier</option>
				<option value = "Lhasa Apso" >  Lhasa Apso</option>
				<option value = "Lowchen" >  Lowchen</option>
				<option value = "Maltese" >  Maltese</option>
				<option value = "Standard Manchester Terrier" > Standard Manchester Terrier</option>
				<option value = "Mastiff" >  Mastiff</option>
				<option value = "Miniature Bull Terrier" >  Miniature Bull Terrier</option>
				<option value = "Miniature Pinche" > Miniature Pinscher</option>
				<option value = "Miniature Poodle" > Miniature Poodle</option>
				<option value = "Miniature Schnauzer" >Miniature Schnauzer</option>
				<option value = "Mutt" >Mutt</option>
				<option value = "Neopolitan Mastiff" >Neopolitan Mastiff</option>
				<option value = "Newfoundland"> Newfoundland </option>
				<option value = "Newfolk Terrier" >Norfolk Terrier</option>
				<option value = "Norwegian Elkhound" > Norwegian Elkhound</option>
				<option value = "Norwich Terrier" > Norwich Terrier</option>
				<option value = "Nova Scotia Duck Tolling Retriever"> Nova Scotia Duck 	   Tolling Retriever</option>
				<option value = "Old English Sheepdog">Old English Sheepdog</option>
				<option value = "Otterhound" > Otterhound</option>
				<option value = "Papillon" >Papillon</option>
				<option value = "Parson Russell Terrier" > Parson Russell Terrier</option>
				<option value = "Pekingese" >Pekingese</option>
				<option value = "Pembroke Welsh Corgi" >Pembroke Welsh Corgi</option>
				<option value = "Petit Basset Griffon Vendeen">Petit Basset Griffon Vendeen</option>
				<option value = "Pharch Hound" >Pharoh Hound</option>
				<option value = "Plott" > Plott</option>
				<option value = "Pointer" > Pointer </option>
				<option value = "Polish Lowland Sheepdog" >Polish Lowland Sheepdog</option>
				<option value = "Pomeranian" > Pomeranian</option>
				<option value = "Portuguese Water Dog" >Portuguese Water Dog </option>
				<option value = "Pug" >Pug</option>
				<option value = "Pull" >Puli</option>
				<option value = "Rhodesian Ridgeback" >Rhodesian Ridgeback</option>
				<option value = "Rottweiler" >Rottweiler</option>
				<option value = "ASaint Bernard" > Saint Bernard</option>
				<option value = "Saluki" > Saluki</option>
				<option value = "Samoyed" >Samoyed</option>
				<option value = "Schipperke" >Schipperke</option>
				<option value = "Scottish Doverhound" >Scottish Deerhound</option>
				<option value = "Scottish Terrier" >Scottish Terrier</option>
				<option value = "Sealyham Terrier" >Sealyham Terrier</option>
				<option value = "Shetland Sheepdog" >Shetland Sheepdog</option>
				<option value = "Shiba Inu" >Shiba Inu</option>
				<option value = "Shih Tzu" >Shih Tzu</option>
				<option value = "Siberian Husky" >Siberian Husky</option>
				<option value = "Silky Terrier" >Silky Terrier</option>
				<option value = "Skye Terrier" >Skye Terrier </option>
				<option value = "Smooth Fox Terrier" >Smooth Fox Terrier</option>
				<option value = "Soft Coated Wheaten Terrier" >Soft Coated wheaten Terrier</option>
				<option value = "Spinone Italiano" >Spinone Italiano</option>
				<option value = "Staffordshire Bull Terrier" >Staffordshire Bull Terrier</option>
				<option value = "Standard Poodle" >Standard Poodle</option>
				<option value = "Standard Schnauer" > Standard Schnauzer</option>
				<option value = "Suseex Spaniel"  >Sussex Spaniel</option>
				<option value = "Swedish Vallhound" >Swedish Vallhund</option>
				<option value = "Tibertan Mastiff" >Tibetan Mastiff</option>
				<option value = "Tibertan Spaniel" >Tibetan Spaniel</option>
				<option value = "Tibetan Terrier" >Tibetan Terrier </option>
				<option value = "Toy Fox Terrier" >Toy Fox Terrier </option>
				<option value = "Toy Manchester Terrier" >Toy Manchester Terrier </option>
                <option value = "Toy Poodle" >Toy Poodle</option>
				<option value = "Vizela" >Vizela</option>
				<option value = "Weimaraner" >Weimaraner</option>
				<option value = "Welsh Springer Spaniel" >Welsh Springer Spaniel</option>
				<option value = "Welsh Terrier" >Welsh Terrier </option>
				<option value = "West Highland White Terrier" >West Highland White Terrier </option>
				<option value = "Whippet" >Whippet</option>
				<option value = "Wire Fox Terrier" >Wire Fox Terrier </option>
				<option value = "Wirehaired Pointing Griffon" >Wirehaired Pointing Griffon</option>
				<option value = "Yorkshire Terrier">Yorkshire Terrier 	</option>
                	</select>	</td>
</tr>
<tr>
	<td>Nutritional Needs:</td>
	<td><textarea name="nutritionalNeeds" cols="17" rows="5"></textarea>	</td>
</tr>
<tr>
	<td>Special Instructions</td>
	<td><textarea name="specialInstructions" cols="17" rows="5"></textarea></td>
</tr>
<tr>
	<td colspan = "6"><h2>Order Information</h2></td>
</tr>
<tr>
    <td><strong>Product Name</strong></td>
    <td>&nbsp;</td>
    <td><strong>Price </strong></td>
</tr>

<?php  

  $query = "SELECT * FROM treats"; 
        $result_set = mysql_query($query) or die(mysql_error());
$i = 0;

    
		$total=0;
        while ($row = mysql_fetch_array($result_set))
        {?>
        <div style="width:0px; display:none;">
			<input style="width:0px;" name="quantity<?php echo $row['product_id']; ?>" type="hidden" size="2" value="<?php echo $_POST["quantity".$row["product_id"]];?>" />
            </div>
        <?php
			if($_POST["quantity".$row["product_id"]]!="")
			{
?>
<tr>  
	<td><?php 
			//echo $row["product_title"];
			$pro= $row["product_title"];
			echo $pro;
			$pro .=$pro.", ";
			
			?></td>
    <td><?php echo $_POST["quantity".$row["product_id"]];?> x <?php echo $row["price"];?></td>
	<td align="right"> $<?php echo number_format($_POST["quantity".$row["product_id"]] * $row["price"],2); ?></td>
</tr>
<?php
$quantity+=$_POST["quantity".$row["product_id"]]; 
		}
 
$total+= number_format($_POST["quantity".$row["product_id"]] * $row["price"],2);
}
?>

<tr>
  <td></td>
  <td><strong>Total</strong></td>
  <td align="right"><strong>$<?php $total_pro=number_format($total,2); echo $total_pro; ?></strong></td>
</tr>
<tr>  
    <td></td>  
    <td>Sales Tax:  </td>
    <td align="right"><?php echo round (TotalSalesTax($total),2); $total=$total+TotalSalesTax($total);?>  	</td> 
</tr>
<tr>
	<td></td>
    <td>Subtotal:  </td> 
    <td align="right"><?php echo number_format($total,2);?>  	</td> 
</tr>
<tr>
	<td></td>	
    <td>Shipping:  </td>
    <td align="right"> <?php echo shippingCost($quantity);?> 	</td>
</tr>
<tr>  
	<td>  </td>
    <td>  Total:  </td>
    <td align="right"><?php  $total=$total+shippingCost($quantity); echo number_format($total,2); ?> 	</td>
</tr>
<tr>
<td></td>   
	<td><input name="reset" type="submit" value="Cancel Order" /> </td><td> <input name="Submit" type="submit" value="Order Treats!" /></td>
    <td>
    
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&item_name=<?php echo $pro; ?>&amount=<?php echo $total_pro;?>&undefined_quantity=<?php echo $_POST["quantity".$row["product_id"]];?>&tax_rate=<?php echo round (TotalSalesTax($total),2); ?>&handling=<?php echo shippingCost($quantity);?>&business=auntievics@gmail.com"><img width="" height="" border="0" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_SM.gif" alt=""></a>
    
    </td>
</tr>
<tr>
	<td>
		<?php
		require_once('recaptchalib.php');
		$privatekey = "6LdxwsoSAAAAAO4CWYDjkrGQsf5GXuIopJcC6SkE";
		$publickey = "6LdxwsoSAAAAAFrZTLjBoDvLLjk9_NR_ubncL-24";
		if(isset($_REQUEST["submit"]) && $_REQUEST["submit"]=="Order Treats!"){
		
		
		$resp = recaptcha_check_answer ($privatekey,
		$_SERVER["REMOTE_ADDR"],
		$_POST["recaptcha_challenge_field"],
		$_POST["recaptcha_response_field"]);
		
			if (!$resp->is_valid) {
					$msg=$resp->error;
			}else{
				
			}
		}
        ?>
		<?php
         // you got this from the signup page
		 
        echo recaptcha_get_html($publickey, $msg);
        ?>

</td>
</tr>
</table>
</form>
</body>
</html>


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1