Help with understanding sessions

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

34 Replies - 1140 Views - Last Post: 12 November 2011 - 02:50 PM Rate Topic: -----

#1 mindiapolis  Icon User is offline

  • D.I.C Head

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

Help with understanding sessions

Posted 02 November 2011 - 07:27 PM

Hi, I haven't been programming PHP very long. I do understand most of PHP except sessions. For some reason I'm having trouble grasping that concept. I am developing a website that has a product page and a checkout page in which the product page is mainly database driven. It can be seen at http://auntievics.com/treats.php. Somehow I need to be ablefor the product name, price and the quantity to be able to transfer over to the checkout page. I know that
<?php
session_start();
if (isset($_SESSION['cart'])){
foreach ($_SESSION['cart'] as $key => $value){
//echo "Product Number $key Quantity $value<br />";
}
}


go at the top of both pages. On the checkout page I have
<?php
/*foreach($key as $value){
		echo $value;
	}*/
?>


where I want the session variables to transfer, but it is not working. Can someone please walk me through this? The help would be much appreciated.

Is This A Good Question/Topic? 0
  • +

Replies To: Help with understanding sessions

#2 DimitriV  Icon User is offline

  • They don't think it be like it is, but it do
  • member icon

Reputation: 583
  • View blog
  • Posts: 2,738
  • Joined: 24-July 11

Re: Help with understanding sessions

Posted 02 November 2011 - 07:31 PM

Sessions? Check out w3schools!
http://www.w3schools...hp_sessions.asp
Was This Post Helpful? 0
  • +
  • -

#3 mindiapolis  Icon User is offline

  • D.I.C Head

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

Re: Help with understanding sessions

Posted 02 November 2011 - 07:32 PM

sorry, it should be http://auntievics.com/treats.php
Was This Post Helpful? 0
  • +
  • -

#4 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Help with understanding sessions

Posted 02 November 2011 - 07:35 PM

Ew W3Schools. I wouldn't suggest using them.

No where have you stated that you're setting anything to the $_SESSION array.

When you create that session it should look like

$_SESSION['cart'] = array('blah' => 'ha');


Are you capable of posting more of your code?
Was This Post Helpful? 0
  • +
  • -

#5 mindiapolis  Icon User is offline

  • D.I.C Head

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

Re: Help with understanding sessions

Posted 02 November 2011 - 07:35 PM

still not understanding, sorry
Was This Post Helpful? 0
  • +
  • -

#6 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Help with understanding sessions

Posted 02 November 2011 - 07:39 PM

Well, I'm not understanding what you're asking since you're not really showing much code.

$_SESSION works as an array (do note that I'm saying an array which is a rather vague description of it). You must set something set to $_SESSION['what_you_want_it_called']. You can't just start using a session if you haven't created one. That's a concept that shouldn't take to long to understand, so just take a few seconds to think about it.

I suggest you read up about sessions at the documentation.

We also have great tutorials on handling sessions like this one.

This post has been edited by EnvXOwner: 02 November 2011 - 07:40 PM

Was This Post Helpful? 2
  • +
  • -

#7 codeprada  Icon User is offline

  • Changed Man With Different Priorities
  • member icon

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

Re: Help with understanding sessions

Posted 02 November 2011 - 07:51 PM

Could be that you're not adding the elements to your cart array correctly. Since $_SESSION['cart'] holds an array the code to add new items may look something like this...
<?php
   session_start();
   $_SESSION['cart']['product_name'] = 99;
?>


Was This Post Helpful? 1
  • +
  • -

#8 creativecoding  Icon User is offline

  • Hash != Encryption
  • member icon


Reputation: 926
  • View blog
  • Posts: 3,205
  • Joined: 19-January 10

Re: Help with understanding sessions

Posted 02 November 2011 - 07:56 PM

Session variables are stored (securely) on the server in a temporary folder. A cookie is stored on your clients machine with a unique id (using cookies, which is why sessions do not work if cookies are disabled in your clients browser). It will get the session data matching that unique id and from there, you can use the variables you set. All of the data is stored on your server, meaning the variables are safe and most likely cannot be viewed without you allowing the client to. However, there are things like session hijacking where if I get the unique id of another user, I can pose as that user using his id, so php will think that I am actually that guy and it will load his variables for me.

Using sessions is easy. You have to start it on each page you will be using them. This is done with session_start(); which is usually placed at the beginning of the script. From there, you use $_SESSION like an array, and you can store data and such within it, which will be saved over the session for use on other pages.


For a checkout thing, you may have something like this:

products.php:
Click what you want to buy
<a href="view.php?id=apple" target="_BLANK">Apple</a><br>
<a href="view.php?id=orange" target="_BLANK">Orange</a><br>
<a href="view.php?id=peach" target="_BLANK">Peach</a><br>
<br>
<a href="checkout.php">Checkout</a>



view.php:
<?php
session_start();
if(in_array($_GET['id'], $_SESSION['cart'])){
    echo "You have already bought this item.";
} else {
    echo $_GET['id'] . " added to cart.";
}
?>



checkout.php:
<?php
session_start();
echo "You are buying:";
foreach($_SESSION['cart'] as $item){
    echo $item . "<br>";
}
?>


This post has been edited by creativecoding: 02 November 2011 - 08:01 PM

Was This Post Helpful? 1
  • +
  • -

#9 mindiapolis  Icon User is offline

  • D.I.C Head

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

Re: Help with understanding sessions

Posted 03 November 2011 - 08:16 AM

okay, see if I would be setting the array up right.

$order=array('product_name'=>'$product_title',
             'price'='$price',
             'quantity'='$quantity',
            );


am I on the right track so far?
Was This Post Helpful? 0
  • +
  • -

#10 codeprada  Icon User is offline

  • Changed Man With Different Priorities
  • member icon

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

Re: Help with understanding sessions

Posted 03 November 2011 - 08:36 AM

Having the quotes around your values isn't necessary there. PHP won't parse them since they're not in double quotes but quotes aren't needed here.

After you've done this what do you do with $order?
Was This Post Helpful? 0
  • +
  • -

#11 mindiapolis  Icon User is offline

  • D.I.C Head

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

Re: Help with understanding sessions

Posted 03 November 2011 - 09:07 AM

I'm wanting to transfer the $order from the treats page to the checkout page. Does
it matter if the product name & price are coming from a database?
Was This Post Helpful? 0
  • +
  • -

#12 Jstall  Icon User is offline

  • Lurker
  • member icon

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

Re: Help with understanding sessions

Posted 03 November 2011 - 09:46 AM

Where the values are coming from shouldn't matter, however you most likely want to use a double arrow instead of a = when you are assigning values to your array:
$order=array('product_name'=>'$product_title',
             'price'='$price',
             'quantity'='$quantity',
            );


//should be 
$order = array('product_name'=>'$product_title',
             'price'=>'$price',
             'quantity'=>'$quantity',
            );



Was This Post Helpful? 1
  • +
  • -

#13 mindiapolis  Icon User is offline

  • D.I.C Head

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

Re: Help with understanding sessions

Posted 03 November 2011 - 10:48 AM

so would I put
	foreach($_SESSION['cart'] as $item){
	    echo $item . "<br>";


on the checkout page where I want the selected products to appear?
Was This Post Helpful? 0
  • +
  • -

#14 Jstall  Icon User is offline

  • Lurker
  • member icon

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

Re: Help with understanding sessions

Posted 03 November 2011 - 11:25 AM

It would depend on the way you are storing data. $_SESSION is an array. You can access elements of it by specifying a key, in your case 'cart'. If you make $_SESSION['cart'] an array and add items to it then certainly you can iterate over it using foreach.

I suggest you familiarize yourself with these concepts by reading the links I provided, it may help in your understanding.
Was This Post Helpful? 0
  • +
  • -

#15 mindiapolis  Icon User is offline

  • D.I.C Head

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

Re: Help with understanding sessions

Posted 07 November 2011 - 09:06 AM

Okay, let's start out by just transferring the quantity from the treats page to the checkout page. I think I understand it better but the quantity is not transferring. Can I get a little more help please?

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

	{
	  $_SESSION['quanity']=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=\"2s00px\"><img src=\"{$row['product_pic']}\" /></td><td width=\"200px\">{$row['product_title']}.<br /><br />{$row['product_Description']}.<br /> Price:  \${$row['price']}.<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.php
<?php
session_start();
require_once("functions.php");
DatabaseConnection(); 
?>
<!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>
<link href="doggyTreats.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#order {

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

</style>
</head>
<body>
  
<?php        
logo();
navBar();
?>  
<form action="" method="post" name="checkOut">
<table id="order">
<tr class="orderRow">  
	<td> First name:<br />
	<input name="fname" type="text" size="10" maxlength="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>
	<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>
			<option value = "AL" />AL</option>
			<option value = "AK" />AK</option>
			<option value = "AR" />AR</option>
			<option value = "AZ" />AZ
			<option value = "CA" />CA
			<option value = "CO" />CO
			<option value = "CT" />CT
			<option value = "DE" />DE
			<option value = "DC" />DC
			<option value = "FL" />FL
			<option value = "GA" />GA
			<option value = "HI" />HI									

						
			<option value = "IA" />IA
			<option value = "ID" />ID
			<option value = "IL" />IL
			<option value = "IN" />IN
			<option value = "KS" />KS
			<option value = "KY" />KY
			<option value = "LA" />LA
			<option value = "MA" />MA
			<option value = "ME" />ME
			<option value = "MD" />MD
			<option value = "MI" />MI
			<option value = "MN" />MN
			<option value = "MO" />MO
			<option value = "MS" />MS
			<option value = "MT" />MT
			<option value = "NC" />NC
			<option value = "ND" />ND
			<option value = "NE" />NE
			<option value = "NH" />NH
			<option value = "NJ" />NJ
			<option value = "NM" />NM
			<option value = "OH" />OH
			<option value = "OK" />OK
			<option value = "OR" />OR
			<option value = "PA" />PA
			<option value = "RI" />RI
			<option value = "SC" />SC
			<option value = "SD" />SD
			<option value = "TN" />TN
			<option value = "TX" />TX
			<option value = "UT" />UT
			<option value = "VA" />VA
 			<option value = "VT" />VT
			<option value = "WA" />WA
			<option value = "WI" />WI
			<option value = "WV" />WV
			<option value = "WY" />WY
			</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 /> 
	Check <input name="check " type="radio" value="Check " /> Money Order <input name="money " type="radio" 

value="Money order " /><br />PayPal<input name="paypal" type="radio" value="Paypal" /> </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 value = "I don't know" />I don't know 
				<option value = "Affernpincher" />Affernpincher
				<option value = "Afghan Hound" />Afghan Hound 
				<option value = "Airedale Terrier" /> Airedale Terrior
				<option value = "Akita" />  Akita 
				<option value = "Alaskan Malamute" />  Alaskan Malamute
				<option value = "Standard American Eskimo Dog"/> Standard American Eskimo Dog
				<option value = "Miniature American Eskimo Dog"/>Miniature American Eskimo 		

                                 Dog
				<option value = "Toy American Eskimo Dog"/> Toy American Eskimo Dog
				<option value = "American Foxhound" />  American Foxhound
				<option value = "American Staffordshire Terrier" />  American Staffordshhire        

                         Terrier
				<option value = "American Water Spaniel" /> American Water Spaniel
				<option value = "Australian Shepherd Dog"/>  Anatolian Shepherd Dog 
				<option value = "Australian Cattle Dog"/>  Australian Cattle Dog
				<option value = "Australian Shepherd"/>  Australian Shepherd 
				<option value = "Australian Terrier" />  Australia Terrier
				<option value = "Basenji" />  Basenji
				<option value = "Basset Hound" />  Basset Hound 
				<option value = "Beagle" />  Beagle
				<option value = "Bearded Collie" />  Bearded Collie
				<option value = "Beauceron" />  Beauceron 
				<option value = "Bedington Terrier"/>  Bedington Terrier
				<option value = "Belgin Malinois"/> Belgin Malinois
				<option value = "Belgian Sheepdog"/>  Belgian Sheepdog
				<option value = "Belgian Tervuren"/>  Belgian Tervuren
				<option value = "Bernese Mountain Dog"/>  Bernese Mountain Dog
				<option value = "Bichon Frise"/>  Bichon Frise
				<option value = "Black and Tan Greyhound" />  Black and Tan Greyhound
				<option value = "Black Russian Terrier" />  Black Russian Terrier
				<option value = "Bloodhoung" />  Bloodhound
				<option value = "Border Collie" /> Border Collie
				<option value = "Border Terrier"/> Border Terrier
				<option value = "Borzoi"/>  Borzoi
				<option value = "Boston Terrier"/>  Boston Terrier
				<option value = "Bouvier des Flandres"/>  Bouvier des Flandres
				<option value = "Boxer"/>  Boxer
				<option value = "Briard"/>  Briard
				<option value = "Brittany" />  Brittany
				<option value = "Brussels Griffon" />  Brussels Griffon
				<option value = "Bulldog" /> Bulldog
				<option value = "Bullmastiff" /> Bullmasttiff
				<option value = "Bull Terrier" />  Bull Terrier
				<option value = "Cairn Terrier" />  Cairn Terrier
				<option value = "Canaan Dog" />  Canaan Dog
				<option value = "Cardigan Welsh Corgi" />  Cardigan Welsh Corgi
				<option value = "Cavalier King Charles Spaniel" />Cavalier King Charles   	    

                             Spaniel
				<option value = "Chesepeake Bay Retriever" />Chesapeake Bay Retriever
				<option value = "Chilauhua" /> Chilauhua
				<option value = "Chinese Created" />  Chinese Crested
				<option value = "Chinese Shar-Pei" />  Chinese Shar-Pei
				<option value = "Chow Chow" />  Chow Chow
				<option value = "Clumber Spaniel" />  Clumber Spaniel
				<option value = "Cocker Spaniel" />  Cocker Spaniel
				<option value = "Collie" />  Collie
				<option value = "Curly-Coated Retrieve" />  Curly-Coated Retriever
				<option value = "Dachshound" />  Dachshund
				<option value = "Dalmation" /> Dalmation
				<option value = "Dandle Dimonnt" /> Dandie Dinmont Terrier
				<option value = "Doberman Pincher" />  Doberman Pincher
				<option value = "Dogue de Bordeaux" /> Dogue de Bordeaux
				<option value = "English Cocker Spaniel" />  English Cocker Spaniel  
				<option value = "English Foxhound" />  English Foxhound
				<option value = "English Setter" />  English Setter
				<option value = "English Springer" /> English Springer
				<option value = "English Toy Spaniel" />  English Toy Spaniel
				<option value = "Field Spaniel" /> Field Spaniel
				<option value = "Finnish Spitz" />  Finnish Spitz
				<option value = "Flat-Coated Retriever" />  Flat-Coated Retriever
				<option value = "French Bulldog" />  French Bulldog
				<option value = "German Shepherd Dog" /> German Shepherd Dog
				<option value = "German Shorthaired Pointer"/>German Shorthaired Pointer
				<option value = "German Wirehaired Pointer" />  German Wirehaired Pointer 
				<option value = "Giant Schnauzer" /> Giant Schnauzer
				<option value = "Glen of Imaal Terrier" />  Glen of Imaal Terrier
				<option value = "Golden Retriever" /> Golden Retriever
				<option value = "Gorden Setter" /> Gorden Setter
				<option value = "Great Dane" /> Great Dane
				<option value = "Greater Swiss Mountain Dog" /> Greater Swiss Mountain Dog
				<option value = "Great Pyrenees" /> Great Pyrenees
				<option value = "Greyhound" /> Greyhound
				<option value = "Harrier"  /> Harrier
				<option value = "Havanese" />  Havanese
				<option value = "Ibizen Hound" /> Ibizen Hound 
				<option value = "Irish Setter" />  Irish Setter
				<option value = "Irish Terrier" /> Irish Terrier
				<option value = "Irish Water Spaniel" /> Irish Water Spaniel
				<option value = "Irish Wolfhound" />  Irish Wolfhound
				<option value = "Italian Greyhound" />  Italian Greyhound
				<option value = "Jack Russell Terrier" />  Jack Russell Terrier
				<option value = "Japanese Chin" />  Japanese Chin
				<option value = "Keeshound" />  Keeshound
				<option value = "Kerry Blue TErrier" />  Kerry Blue Terrier
				<option value = "Komondor" /> Komondor
				<option value = "Kuvasz" />  Kuvasz
				<option value = "Labradar Retriever" />  Labrador Retriever
				<option value = "Lakeland Terrier" />  Lakeland Terrier
				<option value = "Lhasa Apso" />  Lhasa Apso
				<option value = "Lowchen" />  Lowchen
				<option value = "Maltese" />  Maltese
				<option value = "Standard Manchester Terrier" /> Standard Manchester Terrier
				<option value = "Mastiff" />  Mastiff
				<option value = "Miniature Bull Terrier" />  Miniature Bull Terrier
				<option value = "Miniature Pinche" /> Miniature Pinscher
				<option value = "Miniature Poodle" /> Miniature Poodle
				<option value = "Miniature Schnauzer" />Miniature Schnauzer
				<option value = "Mutt" />Mutt
				<option value = "Neopolitan Mastiff" />Neopolitan Mastiff
				<option value = "Newfoundland&nbsp" /> Newfoundland 
				<option value = "Newfolk Terrier" />Norfolk Terrier
				<option value = "Norwegian Elkhound" /> Norwegian Elkhound
				<option value = "Norwich Terrier" /> Norwich Terrier
				<option value = "Nova Scotia Duck Tolling Retriever" /> Nova Scotia Duck 	    

                             Tolling Retriever
				<option value = "Old English Sheepdog" />Old English Sheepdog
				<option value = "Otterhound" /> Otterhound
				<option value = "Papillon" />Papillon
				<option value = "Parson Russell Terrier" /> Parson Russell Terrier
				<option value = "Pekingese" />Pekingese
				<option value = "Pembroke Welsh Corgi" />Pembroke Welsh Corgi
				<option value = "Petit Basset Griffon Vendeen" />Petit Basset Griffon Vendeen
				<option value = "Pharch Hound" />Pharoh Hound
				<option value = "Plott" /> Plott
				<option value = "Pointer" /> Pointer 
				<option value = "Polish Lowland Sheepdog" />Polish Lowland sheepdog
				<option value = "Pomeranian" /> Pomeranian
				<option value = "Portuguese Water Dog" />Portuguese Water Dog 
				<option value = "Pug" />Pug
				<option value = "Pull" />Puli
				<option value = "Rhodesian Ridgeback" />Rhodesian Ridgeback
				<option value = "Rottweiler" />Rottweiler
				<option value = "ASaint Bernard" /> Saint Bernard
				<option value = "Saluki" /> Saluki
				<option value = "Samoyed" />Samoyed
				<option value = "Schipperke" />Schipperke
				<option value = "Scottish Doverhound" />Scottish Deerhound
				<option value = "Scottish Terrier" />Scottish Terrier
				<option value = "Sealyham Terrier" />Sealyham Terrier
				<option value = "Shetland Sheepdog" />Shetland Sheepdog
				<option value = "Shiba Inu" />Shiba Inu
				<option value = "Shih Tzu" />Shih Tzu
				<option value = "Siberian Husky" />Siberian Husky
				<option value = "Silky Terrier" />Silky Terrier
				<option value = "Skye Terrier" />Skye Terrier 
				<option value = "Smooth Fox Terrier" />Smooth Fox Terrier
				<option value = "Soft Coated Wheaten Terrier" />Soft Coated wheaten Terrier
				<option value = "Spinone Italiano" />Spinone Italiano
				<option value = "Staffordshire Bull Terrier" />Staffordshire Bull Terrier
				<option value = "Standard Poodle" />Standard Poodle
				<option value = "Standard Schnauer" /> Standard Schnauzer
				<option value = "Suseex Spaniel"  />Sussex Spaniel
				<option value = "Swedish Vallhound" />Swedish Vallhund
				<option value = "Tibertan Mastiff" />Tibetan Mastiff
				<option value = "Tibertan Spaniel" />Tibetan Spaniel
				<option value = "Tibetan Terrier" />Tibetan Terrier 
				<option value = "Toy Fox Terrier" />Toy Fox Terrier 
				<option value = "Toy Manchester Terrier" />Toy Manchester Terrier 
                <option value = "Toy Poodle" />Toy Poodle
				<option value = "Vizela" />Vizela
				<option value = "Weimaraner" />Weimaraner
				<option value = "Welsh Springer Spaniel" />Welsh Springer Spaniel
				<option value = "Welsh Terrier" />Welsh Terrier 
				<option value = "West Highland White Terrier" />West Highland White Terrier 
				<option value = "Whippet" />Whippet
				<option value = "Wire Fox Terrier" />Wire Fox Terrier 
				<option value = "Wirehaired Pointing Griffon" />Wirehaired Pointing Griffon
				<option value = "Yorkshire Terrier" />Yorkshire Terrier 	
                	</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>   
<?php
echo $quantity;
/*foreach($key as $value){
		echo $value;
	}*/
?>
</tr>
<tr>
	<td> <input name="Submit" type="submit" value="Order Treats!" /></td><td><input name="reset" type="submit" value="Cancel Order" /> </td>
</tr>
</table>
</form>
</body>
</html>


Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3