Photo-Graffix -> Checkout Page.

  • Brian Jester
  • Beginner
  • Beginner
  • Brian Jester
  • Posts: 61
  • Loc: Bayonne, New Jersey USA

Post 3+ Months Ago

Hi all,

I need to write up a simple checkout page in php. But this will need to be 'connected' in a 'variable sense' with photo-graffix gallery.

I have some code but very little, that's why I am here for some help.

Ok, first I would download a demo of the program (unless you that good, and don't need it)...

I have a demo of Photo-Graffix 3.3

Code: [ Select ]
http://www.photo-graffix.com/trial.php


Ok, to begin...

To get a variable to be echoed out to the 'checkout.php' page using photo-graffix is like such:

Where ever you put this code in the checkout.php page:
Code: [ Select ]
<?php $name = $_GET['photoname']; echo $name ?>


It will display the name of the image name that you specify on the url string such as 'YourPic' (without the quotes) as specified in the url below.

Code: [ Select ]
http://www.yourdomain.com/graffix/checkout.php?photoname=YourPic


Note: YourPic (as specified in the above url) can be anything, I will use it for the item number for each image in the gallery. Also, if anyone has another suggestion for the url above that will substitute 'YourPic' for a variable based on the image clicked on in the gallery (not sure if photo-graffix works like that), but that would be awesome if you found out, so I don't have to type in each item number for each url. But if need be, I will do it.

Now I also would need the description to be echoed out onto the checkout page as well, keep in mind this is only a basic checkout page, so not to be technical. Now I haven't tested the code below so I don't know if it works, but I will need the description as well to be echoed to the checkout page. This code was emailed to me from photo-graffix, they said it works. I haven't tested it yet though.

Code: [ Select ]
http://www.yourdomain.com/gallery/checkout.php?item=photoname&description=photodescr


Now that you know that, a basic checkout page may look like this:

HTML Code: [ Select ]
<!-- CONTENT STARTS -->
<p align="center"><font face="Verdana">Checkout Page</font></p>
<table border="0">
   <tr>
      <td><font face="Verdana" size="2">&nbsp;Item Name:&nbsp; <?php $name = $_GET['photoname']; echo $name ?> </font></td>
   </tr>
</table>
<table border="0">
   <tr>
      <td><font face="Verdana" size="2">Quantity: </font>
      <input type="text" name="T1" size="2"> </td>
   </tr>
</table>
<br>
<table border="0" cellspacing="0" cellpadding="0" height="240" width="596">
<tr>
<td height="20"><font face="Verdana" size="2">&nbsp;First Name: </font>
<font face="Verdana"><font size="1"><input type="text" name="fname" size="17">
</font>
<font color="#FF0000" size="1">*</font></font></td>
</tr>
<tr>
<td height="20"><font face="Verdana" size="2">&nbsp;Last Name: </font>
<font face="Verdana"><font size="1"><input type="text" name="lname" size="29">
</font>
<font color="#FF0000" size="1">*</font></font></td>
</tr>
<tr>
<td height="20"><font face="Verdana"><font size="2">&nbsp;Street Address:
</font><font size="1"><input type="text" name="address" size="31"> </font>
<font size="1" color="#FF0000">*</font><font size="1"> (Please Include Apt #,
Suite #, Floor Etc.)</font></font></td>
</tr>
<tr>
<td height="20"><font face="Verdana"><font size="2">&nbsp;City: </font>
<font size="1">
<input type="text" name="city" size="24">
<font color="#FF0000">*</font></font></font></td>
</tr>
<tr>
<td height="20"><font face="Verdana"><font size="2">&nbsp;State: </font>
<font size="1">
<input type="text" name="State" size="2" value="NJ">
<font color="#FF0000">*</font></font></font></td>
</tr>
<tr>
<td height="20"><font face="Verdana"><font size="2">&nbsp;Zip Code:
</font><font size="1"><input type="text" name="address5" size="9">
<font color="#FF0000">* </font>(Zip+4 Ok)</font></font></td>
</tr>
</table>
<!-- CONTENT ENDS -->
<p align="left"><font color="#FF0000" size="1" face="Verdana">*</font><font face="Verdana" size="2">
</font><font size="1" face="Verdana">Denotes Required Field</font></p>
<a href="print.php">Print Order</a>
  1. <!-- CONTENT STARTS -->
  2. <p align="center"><font face="Verdana">Checkout Page</font></p>
  3. <table border="0">
  4.    <tr>
  5.       <td><font face="Verdana" size="2">&nbsp;Item Name:&nbsp; <?php $name = $_GET['photoname']; echo $name ?> </font></td>
  6.    </tr>
  7. </table>
  8. <table border="0">
  9.    <tr>
  10.       <td><font face="Verdana" size="2">Quantity: </font>
  11.       <input type="text" name="T1" size="2"> </td>
  12.    </tr>
  13. </table>
  14. <br>
  15. <table border="0" cellspacing="0" cellpadding="0" height="240" width="596">
  16. <tr>
  17. <td height="20"><font face="Verdana" size="2">&nbsp;First Name: </font>
  18. <font face="Verdana"><font size="1"><input type="text" name="fname" size="17">
  19. </font>
  20. <font color="#FF0000" size="1">*</font></font></td>
  21. </tr>
  22. <tr>
  23. <td height="20"><font face="Verdana" size="2">&nbsp;Last Name: </font>
  24. <font face="Verdana"><font size="1"><input type="text" name="lname" size="29">
  25. </font>
  26. <font color="#FF0000" size="1">*</font></font></td>
  27. </tr>
  28. <tr>
  29. <td height="20"><font face="Verdana"><font size="2">&nbsp;Street Address:
  30. </font><font size="1"><input type="text" name="address" size="31"> </font>
  31. <font size="1" color="#FF0000">*</font><font size="1"> (Please Include Apt #,
  32. Suite #, Floor Etc.)</font></font></td>
  33. </tr>
  34. <tr>
  35. <td height="20"><font face="Verdana"><font size="2">&nbsp;City: </font>
  36. <font size="1">
  37. <input type="text" name="city" size="24">
  38. <font color="#FF0000">*</font></font></font></td>
  39. </tr>
  40. <tr>
  41. <td height="20"><font face="Verdana"><font size="2">&nbsp;State: </font>
  42. <font size="1">
  43. <input type="text" name="State" size="2" value="NJ">
  44. <font color="#FF0000">*</font></font></font></td>
  45. </tr>
  46. <tr>
  47. <td height="20"><font face="Verdana"><font size="2">&nbsp;Zip Code:
  48. </font><font size="1"><input type="text" name="address5" size="9">
  49. <font color="#FF0000">* </font>(Zip+4 Ok)</font></font></td>
  50. </tr>
  51. </table>
  52. <!-- CONTENT ENDS -->
  53. <p align="left"><font color="#FF0000" size="1" face="Verdana">*</font><font face="Verdana" size="2">
  54. </font><font size="1" face="Verdana">Denotes Required Field</font></p>
  55. <a href="print.php">Print Order</a>


Ok..Now for the 'tough' part it's making me :mad: Been try so hard to get this, need help bad here.

I want to add a simple checkout.php page that can do the following:

1. Save sessions (very simple shopping cart) so more than one item can be added to the checkout.php page
2. Make Printer Friendly (so the page can be printed on paper without problems)

Here's a page where php session help with refresh your memory if need be.

Code: [ Select ]
http://www.thewatchmakerproject.com/journal/276/building-a-simple-php-shopping-cart


I Thank all who help with this project!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

Im going to guess that your items are stored in a database?

If they are then you should have some sort of unquie key for every item. What I would do is when someone wants to put something into there cart, you send that unquie id int he URL. On your shopping chart page take that ID and add it to a session array. Then read that array and display the information for that item in the shopping cart.

The only reason I could see you needing to send the title and description of the item in the URL is if you dont have a database to store that information.

A print friendly page of sorts is rather easy, just make it no wider than a standard sheet of paper.
  • Brian Jester
  • Beginner
  • Beginner
  • Brian Jester
  • Posts: 61
  • Loc: Bayonne, New Jersey USA

Post 3+ Months Ago

Did you download Photo-Graffix? It's not a database. I tried creating a database but only because I couldn't seem to get variables working otherwise. All I am asking for is a way to create a simple checkout page, could someone just put up a bit of code for me? The application is very small filesize.

Thanks.
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

Well if all you want to do is store information that is transfered over the URL you can use this script.

If your trying to make your own system to do money transactions good luck.

PHP Code: [ Select ]
 
<?php
 
 
 
/**
 
 * @author Travis Person
 
 * @copyright 2007
 
 *
 
 * Developed with PHP Designer 2007
 
 *    <!-- m --><span class="postlink">http://mpsoftware.de</span><!-- m -->
 
 *
 
 */
 
 
 
// Start a session
 
   session_start();
 
 
 
// Grab information from URL
 
   $name = $_GET['photoname'];
 
   $desc = $_GET['description'];
 
 
 
// If this is the first time viewing page make the cart session var an array
 
   if (!$_SESSION['cart'])
 
   {
 
         $_SESSION['cart'] = array();
 
   }
 
 
 
// Transfer array
 
   $arrayCART = $_SESSION['cart'];
 
 
 
// Add tiems to the item array
 
   $arrayITEM['NAME'] = $name;
 
   $arrayITEM['DESC'] = $desc;
 
 
 
// Put informtion into the cart
 
   array_push($arrayCART, $arrayITEM);
 
 
 
 
 
// Store the cart back in the session
 
   $_SESSION['cart'] = $arrayCART;
 
 
 
   echo '<table border=\'0\'>'."\n";
 
 
 
   foreach ($arrayCART as $id => $name)
 
   {
 
         foreach ($arrayCART[$id] as $key => $info)
 
         {
 
               echo "\t" . '<tr>'."\n";
 
               echo "\t\t" . '<td>'. $key . ':' . $info . '</td>'."\n";
 
               echo "\t" . '</tr>'."\n";
 
 
 
         }
 
         echo "\t" . '<tr>'."\n";
 
         echo "\t\t" . '<td>&nbsp;</td>'."\n";
 
         echo "\t" . '</tr>'."\n";
 
   }
 
 
 
   echo '</table>'."\n";
 
?>
 
 
  1.  
  2. <?php
  3.  
  4.  
  5.  
  6. /**
  7.  
  8.  * @author Travis Person
  9.  
  10.  * @copyright 2007
  11.  
  12.  *
  13.  
  14.  * Developed with PHP Designer 2007
  15.  
  16.  *    <!-- m --><span class="postlink">http://mpsoftware.de</span><!-- m -->
  17.  
  18.  *
  19.  
  20.  */
  21.  
  22.  
  23.  
  24. // Start a session
  25.  
  26.    session_start();
  27.  
  28.  
  29.  
  30. // Grab information from URL
  31.  
  32.    $name = $_GET['photoname'];
  33.  
  34.    $desc = $_GET['description'];
  35.  
  36.  
  37.  
  38. // If this is the first time viewing page make the cart session var an array
  39.  
  40.    if (!$_SESSION['cart'])
  41.  
  42.    {
  43.  
  44.          $_SESSION['cart'] = array();
  45.  
  46.    }
  47.  
  48.  
  49.  
  50. // Transfer array
  51.  
  52.    $arrayCART = $_SESSION['cart'];
  53.  
  54.  
  55.  
  56. // Add tiems to the item array
  57.  
  58.    $arrayITEM['NAME'] = $name;
  59.  
  60.    $arrayITEM['DESC'] = $desc;
  61.  
  62.  
  63.  
  64. // Put informtion into the cart
  65.  
  66.    array_push($arrayCART, $arrayITEM);
  67.  
  68.  
  69.  
  70.  
  71.  
  72. // Store the cart back in the session
  73.  
  74.    $_SESSION['cart'] = $arrayCART;
  75.  
  76.  
  77.  
  78.    echo '<table border=\'0\'>'."\n";
  79.  
  80.  
  81.  
  82.    foreach ($arrayCART as $id => $name)
  83.  
  84.    {
  85.  
  86.          foreach ($arrayCART[$id] as $key => $info)
  87.  
  88.          {
  89.  
  90.                echo "\t" . '<tr>'."\n";
  91.  
  92.                echo "\t\t" . '<td>'. $key . ':' . $info . '</td>'."\n";
  93.  
  94.                echo "\t" . '</tr>'."\n";
  95.  
  96.  
  97.  
  98.          }
  99.  
  100.          echo "\t" . '<tr>'."\n";
  101.  
  102.          echo "\t\t" . '<td>&nbsp;</td>'."\n";
  103.  
  104.          echo "\t" . '</tr>'."\n";
  105.  
  106.    }
  107.  
  108.  
  109.  
  110.    echo '</table>'."\n";
  111.  
  112. ?>
  113.  
  114.  
  • Brian Jester
  • Beginner
  • Beginner
  • Brian Jester
  • Posts: 61
  • Loc: Bayonne, New Jersey USA

Post 3+ Months Ago

I am going to give it a shot SpooF. I will post back on how it works

Thanks alot.
  • Brian Jester
  • Beginner
  • Beginner
  • Brian Jester
  • Posts: 61
  • Loc: Bayonne, New Jersey USA

Post 3+ Months Ago

Hi SpooF,

It did work, but I had to modify it abit...Basically what I needed was to have the name and description to be included in one url string, so I had to combine it to this:

Code: [ Select ]
http://mydomain.com/gallery/checkout.php?photoname=12345&description=test


It works fine, but could you help me do one more thing? I need to know how the submit button link would be on an actual checkout page..Assuming you use an html form with the following fields:

Name:
Address:
City:
State:
Zip:

Then I will modify the form to my needs.
  • Brian Jester
  • Beginner
  • Beginner
  • Brian Jester
  • Posts: 61
  • Loc: Bayonne, New Jersey USA

Post 3+ Months Ago

Here's exactly what I am trying to achieve with the exception of having the Name and Description variables as well as a simple quantity text box so they can enter how many to order:

Code: [ Select ]
http://www.stocksignalpro.com/SSP279order_mail.htm
  • Brian Jester
  • Beginner
  • Beginner
  • Brian Jester
  • Posts: 61
  • Loc: Bayonne, New Jersey USA

Post 3+ Months Ago

Could you do something like that?
Code: [ Select ]
http://www.stocksignalpro.com/SSP279order_mail.htm
With the addition of a quantity text box where they could enter the quantity. Or are you too busy atm? I appreciate you efforts up to this point, however.

Thanks alot in advance!

-Brian
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

So basicly you want it so when a customer is done, they can fill in the rest of the fields, such as in the link you gave, and then submit it to a page to proccess?

If so then thats rather easy. All you do is create a form and have it submit to a php page. Onces its there you can use the $_POST['fieldVarName'] to retrieve the information and do what you want with it.
  • Brian Jester
  • Beginner
  • Beginner
  • Brian Jester
  • Posts: 61
  • Loc: Bayonne, New Jersey USA

Post 3+ Months Ago

Could you set me up with a simple page with the links already in tact? I know I am asking alot, but I have really put everything I had into this, and it's like I am going in circles with it...Your help is greatly appreciated.

Thanks again!
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

Something like this:


PHP Code: [ Select ]
<?php
 
 
 
/**
 
 *  @author  Travis  Person
 
 *  @copyright  2007
 
 *  
 
 *  Developed  with  PHP  Designer  2007  
 
 *                <!-- m --><span class="postlink">http://mpsoftware.de</span><!-- m -->
 
 *
 
 */
 
 
 
   //  Start  a  session
 
   session_start();
 
   
 
   //  Grab  information  from  URL
 
   $name = $_GET['photoname'];
 
   $desc = $_GET['description'];
 
   
 
   //  If  this  is  the  first  time  viewing  page  make  the  cart  session  var  an  array
 
   if (!$_SESSION['cart'])
 
   {
 
     $_SESSION['cart'] = array();
 
   }
 
   
 
   //  Transfer  array
 
   $arrayCART = $_SESSION['cart'];
 
   
 
   //  Add  tiems  to  the  item  array
 
   $arrayITEM['NAME'] = $name;
 
   $arrayITEM['DESC'] = $desc;
 
   
 
   //  Put  informtion  into  the  cart
 
   array_push($arrayCART, $arrayITEM);
 
   
 
   
 
   //  Store  the  cart  back  in  the  session
 
   $_SESSION['cart'] = $arrayCART;
 
   
 
   echo '<table  border=\'0\'>' . "\n";
 
   
 
   foreach ($arrayCART as $id => $name)
 
   {
 
     foreach ($arrayCART[$id] as $key => $info)
 
     {
 
       echo "\t" . '<tr>' . "\n";
 
       echo "\t\t" . '<td>' . $key . ':' . $info . '</td>' . "\n";
 
       echo "\t" . '</tr>' . "\n";
 
   
 
     }
 
     echo "\t" . '<tr>' . "\n";
 
     echo "\t\t" . '<td>&nbsp;</td>' . "\n";
 
     echo "\t" . '</tr>' . "\n";
 
   }
 
   
 
   echo '</table>' . "\n";
 
   
 
   echo '<br>';
 
   echo '<br>';
 
   echo '<br>';
 
   
 
   
 
   if ($_GET['submit'])
 
   {
 
   
 
     //Process submition
 
   
 
     $f_name = $_GET['f_name'];
 
     $f_addr = $_GET['f_addr'];
 
     $f_city = $_GET['f_city'];
 
     $f_state = $_GET['f_state'];
 
     $f_zipcode = $_GET['f_zipcode'];
 
     $f_phone = $_GET['f_phone'];
 
     $f_email = $_GET['f_email'];
 
   
 
   
 
     $message .= 'Name:' . $f_name . "\n";
 
     $message .= 'Address:' . $f_addr . "\n";
 
     $message .= 'City:' . $f_city . "\n";
 
     $message .= 'State:' . $f_state . "\n";
 
     $message .= 'Zip:' . $f_zipcode . "\n";
 
     $message .= 'Phone:' . $f_phone . "\n";
 
     $message .= 'Email:' . $f_email . "\n";
 
   
 
     $result = @mail('youremail@domain.com', 'New Order', $message);
 
   
 
     if ($result)
 
     {
 
       echo 'Order Sent';
 
     }
 
     else
 
     {
 
       echo 'Error occured, please try again';
 
     }
 
   
 
   }
 
   else
 
   {
 
   
 
     echo '          <h2>Continie Checkout</h2>';
 
     echo '          <table border="0" cellpadding="3" cellspacing="0" width="500" bgcolor="#EEEFEE" style="border: D6DFE8 solid 1px">';
 
     echo '            <tr valign="top">';
 
     echo '              <td></td><td><div class="noprint"><p align="left"><font face="Verdana" size="2" color="FF0000"><b>Info Text</b></font></div></td>';
 
     echo '            </tr>';
 
     echo '       <form name="myform">';
 
     echo '            <tr>';
 
     echo '              <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; Name:</font></td>';
 
     echo '              <td width="251" height="31"><font face="Verdana" size="2">';
 
     echo '                <input maxlength=40 size=40 name="f_name" tabindex="1" value="">';
 
     echo '              </font></td>';
 
     echo '            </tr>';
 
     echo '            <tr>';
 
     echo '              <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; Address:</font></td>';
 
     echo '              <td width="251" height="31"><font face="Verdana" size="2">';
 
     echo '         <input maxlength=40 size=40 name="f_addr" tabindex="2"> ';
 
     echo '         </font></td>';
 
     echo '            </tr>';
 
     echo '            <tr>';
 
     echo '              <td width="100" height="31"><font face="Verdana" size="2"> &nbsp;&nbsp;&nbsp;City:</font></td>';
 
     echo '              <td width="251" height="31"><font face="Verdana" size="2">';
 
     echo '                <input maxlength=20 size=20 name="f_city" tabindex="3"></font></td>';
 
     echo '            </tr>';
 
     echo '            <tr>';
 
     echo '              <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; State:</font></td>';
 
     echo '              <td width="251" height="31"><font face="Verdana" size="2">';
 
     echo '         <select name="f_state" tabindex="4">';
 
     echo '            <option value="0">State...</option>';
 
     echo '            <option value="Na">Other / Not USA</option>';
 
     echo '            <option value="AL" >Alabama</option>';
 
     echo '            <option value="AK" >Alaska</option>';
 
     echo '            <option value="AZ" >Arizona</option>';
 
     echo '            <option value="AR" >Arkansas</option>';
 
     echo '            <option value="CA" >California</option>';
 
     echo '            <option value="CO" >Colorado</option>';
 
     echo '            <option value="CT" >Connecticut</option>';
 
     echo '            <option value="DE" >Delaware</option>';
 
     echo '            <option value="DC" >District of Columbia</option>';
 
     echo '            <option value="FL" >Florida</option>';
 
     echo '            <option value="GA" >Georgia</option>';
 
     echo '            <option value="HI" >Hawaii</option>';
 
     echo '            <option value="ID" >Idaho</option>';
 
     echo '            <option value="IL" >Illinois</option>';
 
     echo '            <option value="IN" >Indiana</option>';
 
     echo '            <option value="IO" >Iowa</option>';
 
     echo '            <option value="KS" >Kansas</option>';
 
     echo '            <option value="KY" >Kentucky</option>';
 
     echo '            <option value="LA" >Louisiana</option>';
 
     echo '            <option value="ME" >Maine</option>';
 
     echo '            <option value="MD" >Maryland</option>';
 
     echo '            <option value="MA" >Massachusetts</option>';
 
     echo '            <option value="MI" >Michigan</option>';
 
     echo '            <option value="MN" >Minnesota</option>';
 
     echo '            <option value="MS" >Mississippi</option>';
 
     echo '            <option value="MO" >Missouri</option>';
 
     echo '            <option value="MT" >Montana</option>';
 
     echo '            <option value="NE" >Nebraska</option>';
 
     echo '            <option value="NV" >Nevada</option>';
 
     echo '            <option value="NH" >New Hampshire</option>';
 
     echo '            <option value="NJ" >New Jersey</option>';
 
     echo '            <option value="NM" >New Mexico</option>';
 
     echo '            <option value="NY" >New York</option>';
 
     echo '            <option value="NC" >North Carolina</option>';
 
     echo '            <option value="ND" >North Dakota</option>';
 
     echo '            <option value="OH" >Ohio</option>';
 
     echo '            <option value="OK" >Oklahoma</option>';
 
     echo '            <option value="OR" >Oregon</option>';
 
     echo '            <option value="PA" >Pennsylvania</option>';
 
     echo '            <option value="RI" >Rhode Island</option>';
 
     echo '            <option value="SC" >South Carolina</option>';
 
     echo '            <option value="SD" >South Dakota</option>';
 
     echo '            <option value="TN" >Tennessee</option>';
 
     echo '            <option value="TX" >Texas</option>';
 
     echo '            <option value="UT" >Utah</option>';
 
     echo '            <option value="VT" >Vermont</option>';
 
     echo '            <option value="VA" >Virginia</option>';
 
     echo '            <option value="WA" >Washington</option>';
 
     echo '            <option value="WV" >West Virginia</option>';
 
     echo '            <option value="WI" >Wisconsin</option>';
 
     echo '            <option value="WY" >Wyoming</option>';
 
     echo '          </select></font></td>';
 
     echo '            </tr>';
 
     echo '            <tr>';
 
     echo '              <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; Zip:</font></td>';
 
     echo '              <td width="251" height="31"><font face="Verdana" size="2">';
 
     echo '                <input maxlength=10 size=10 name="f_zipcode" tabindex="5">';
 
     echo '              </font></td>';
 
     echo '            </tr>';
 
     echo '        <tr>';
 
     echo '                <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; Phone#:</font></td>';
 
     echo '              <td width="243" height="31"><font face="Verdana" size="2">';
 
     echo '                <input maxlength=16 size=16 name="f_phone" tabindex="7">';
 
     echo '              </font></td>';
 
     echo '            </tr>';
 
     echo '            <tr>';
 
     echo '              <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; E-mail:</font></td>';
 
     echo '              <td width="253" height="31"><font face="Verdana" size="2">';
 
     echo '                <input maxlength=40 size=40 name="f_email" tabindex="8" value="">';
 
     echo '              </font></td>';
 
     echo '            </tr>';
 
     echo '            <tr>';
 
     echo '              <td colspan="2" width="520"><div class="noprint"><p align="center"><font face="Verdana" size="2">';
 
     echo '                  <input type=button value="Click Here to Submit" name=submit tabindex="9">';
 
     echo '              </font></p></div></td>';
 
     echo '            </tr>';
 
     echo '       </form>';
 
     echo '          </table>';
 
   }
 
 
 
?>
  1. <?php
  2.  
  3.  
  4.  
  5. /**
  6.  
  7.  *  @author  Travis  Person
  8.  
  9.  *  @copyright  2007
  10.  
  11.  *  
  12.  
  13.  *  Developed  with  PHP  Designer  2007  
  14.  
  15.  *                <!-- m --><span class="postlink">http://mpsoftware.de</span><!-- m -->
  16.  
  17.  *
  18.  
  19.  */
  20.  
  21.  
  22.  
  23.    //  Start  a  session
  24.  
  25.    session_start();
  26.  
  27.    
  28.  
  29.    //  Grab  information  from  URL
  30.  
  31.    $name = $_GET['photoname'];
  32.  
  33.    $desc = $_GET['description'];
  34.  
  35.    
  36.  
  37.    //  If  this  is  the  first  time  viewing  page  make  the  cart  session  var  an  array
  38.  
  39.    if (!$_SESSION['cart'])
  40.  
  41.    {
  42.  
  43.      $_SESSION['cart'] = array();
  44.  
  45.    }
  46.  
  47.    
  48.  
  49.    //  Transfer  array
  50.  
  51.    $arrayCART = $_SESSION['cart'];
  52.  
  53.    
  54.  
  55.    //  Add  tiems  to  the  item  array
  56.  
  57.    $arrayITEM['NAME'] = $name;
  58.  
  59.    $arrayITEM['DESC'] = $desc;
  60.  
  61.    
  62.  
  63.    //  Put  informtion  into  the  cart
  64.  
  65.    array_push($arrayCART, $arrayITEM);
  66.  
  67.    
  68.  
  69.    
  70.  
  71.    //  Store  the  cart  back  in  the  session
  72.  
  73.    $_SESSION['cart'] = $arrayCART;
  74.  
  75.    
  76.  
  77.    echo '<table  border=\'0\'>' . "\n";
  78.  
  79.    
  80.  
  81.    foreach ($arrayCART as $id => $name)
  82.  
  83.    {
  84.  
  85.      foreach ($arrayCART[$id] as $key => $info)
  86.  
  87.      {
  88.  
  89.        echo "\t" . '<tr>' . "\n";
  90.  
  91.        echo "\t\t" . '<td>' . $key . ':' . $info . '</td>' . "\n";
  92.  
  93.        echo "\t" . '</tr>' . "\n";
  94.  
  95.    
  96.  
  97.      }
  98.  
  99.      echo "\t" . '<tr>' . "\n";
  100.  
  101.      echo "\t\t" . '<td>&nbsp;</td>' . "\n";
  102.  
  103.      echo "\t" . '</tr>' . "\n";
  104.  
  105.    }
  106.  
  107.    
  108.  
  109.    echo '</table>' . "\n";
  110.  
  111.    
  112.  
  113.    echo '<br>';
  114.  
  115.    echo '<br>';
  116.  
  117.    echo '<br>';
  118.  
  119.    
  120.  
  121.    
  122.  
  123.    if ($_GET['submit'])
  124.  
  125.    {
  126.  
  127.    
  128.  
  129.      //Process submition
  130.  
  131.    
  132.  
  133.      $f_name = $_GET['f_name'];
  134.  
  135.      $f_addr = $_GET['f_addr'];
  136.  
  137.      $f_city = $_GET['f_city'];
  138.  
  139.      $f_state = $_GET['f_state'];
  140.  
  141.      $f_zipcode = $_GET['f_zipcode'];
  142.  
  143.      $f_phone = $_GET['f_phone'];
  144.  
  145.      $f_email = $_GET['f_email'];
  146.  
  147.    
  148.  
  149.    
  150.  
  151.      $message .= 'Name:' . $f_name . "\n";
  152.  
  153.      $message .= 'Address:' . $f_addr . "\n";
  154.  
  155.      $message .= 'City:' . $f_city . "\n";
  156.  
  157.      $message .= 'State:' . $f_state . "\n";
  158.  
  159.      $message .= 'Zip:' . $f_zipcode . "\n";
  160.  
  161.      $message .= 'Phone:' . $f_phone . "\n";
  162.  
  163.      $message .= 'Email:' . $f_email . "\n";
  164.  
  165.    
  166.  
  167.      $result = @mail('youremail@domain.com', 'New Order', $message);
  168.  
  169.    
  170.  
  171.      if ($result)
  172.  
  173.      {
  174.  
  175.        echo 'Order Sent';
  176.  
  177.      }
  178.  
  179.      else
  180.  
  181.      {
  182.  
  183.        echo 'Error occured, please try again';
  184.  
  185.      }
  186.  
  187.    
  188.  
  189.    }
  190.  
  191.    else
  192.  
  193.    {
  194.  
  195.    
  196.  
  197.      echo '          <h2>Continie Checkout</h2>';
  198.  
  199.      echo '          <table border="0" cellpadding="3" cellspacing="0" width="500" bgcolor="#EEEFEE" style="border: D6DFE8 solid 1px">';
  200.  
  201.      echo '            <tr valign="top">';
  202.  
  203.      echo '              <td></td><td><div class="noprint"><p align="left"><font face="Verdana" size="2" color="FF0000"><b>Info Text</b></font></div></td>';
  204.  
  205.      echo '            </tr>';
  206.  
  207.      echo '       <form name="myform">';
  208.  
  209.      echo '            <tr>';
  210.  
  211.      echo '              <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; Name:</font></td>';
  212.  
  213.      echo '              <td width="251" height="31"><font face="Verdana" size="2">';
  214.  
  215.      echo '                <input maxlength=40 size=40 name="f_name" tabindex="1" value="">';
  216.  
  217.      echo '              </font></td>';
  218.  
  219.      echo '            </tr>';
  220.  
  221.      echo '            <tr>';
  222.  
  223.      echo '              <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; Address:</font></td>';
  224.  
  225.      echo '              <td width="251" height="31"><font face="Verdana" size="2">';
  226.  
  227.      echo '         <input maxlength=40 size=40 name="f_addr" tabindex="2"> ';
  228.  
  229.      echo '         </font></td>';
  230.  
  231.      echo '            </tr>';
  232.  
  233.      echo '            <tr>';
  234.  
  235.      echo '              <td width="100" height="31"><font face="Verdana" size="2"> &nbsp;&nbsp;&nbsp;City:</font></td>';
  236.  
  237.      echo '              <td width="251" height="31"><font face="Verdana" size="2">';
  238.  
  239.      echo '                <input maxlength=20 size=20 name="f_city" tabindex="3"></font></td>';
  240.  
  241.      echo '            </tr>';
  242.  
  243.      echo '            <tr>';
  244.  
  245.      echo '              <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; State:</font></td>';
  246.  
  247.      echo '              <td width="251" height="31"><font face="Verdana" size="2">';
  248.  
  249.      echo '         <select name="f_state" tabindex="4">';
  250.  
  251.      echo '            <option value="0">State...</option>';
  252.  
  253.      echo '            <option value="Na">Other / Not USA</option>';
  254.  
  255.      echo '            <option value="AL" >Alabama</option>';
  256.  
  257.      echo '            <option value="AK" >Alaska</option>';
  258.  
  259.      echo '            <option value="AZ" >Arizona</option>';
  260.  
  261.      echo '            <option value="AR" >Arkansas</option>';
  262.  
  263.      echo '            <option value="CA" >California</option>';
  264.  
  265.      echo '            <option value="CO" >Colorado</option>';
  266.  
  267.      echo '            <option value="CT" >Connecticut</option>';
  268.  
  269.      echo '            <option value="DE" >Delaware</option>';
  270.  
  271.      echo '            <option value="DC" >District of Columbia</option>';
  272.  
  273.      echo '            <option value="FL" >Florida</option>';
  274.  
  275.      echo '            <option value="GA" >Georgia</option>';
  276.  
  277.      echo '            <option value="HI" >Hawaii</option>';
  278.  
  279.      echo '            <option value="ID" >Idaho</option>';
  280.  
  281.      echo '            <option value="IL" >Illinois</option>';
  282.  
  283.      echo '            <option value="IN" >Indiana</option>';
  284.  
  285.      echo '            <option value="IO" >Iowa</option>';
  286.  
  287.      echo '            <option value="KS" >Kansas</option>';
  288.  
  289.      echo '            <option value="KY" >Kentucky</option>';
  290.  
  291.      echo '            <option value="LA" >Louisiana</option>';
  292.  
  293.      echo '            <option value="ME" >Maine</option>';
  294.  
  295.      echo '            <option value="MD" >Maryland</option>';
  296.  
  297.      echo '            <option value="MA" >Massachusetts</option>';
  298.  
  299.      echo '            <option value="MI" >Michigan</option>';
  300.  
  301.      echo '            <option value="MN" >Minnesota</option>';
  302.  
  303.      echo '            <option value="MS" >Mississippi</option>';
  304.  
  305.      echo '            <option value="MO" >Missouri</option>';
  306.  
  307.      echo '            <option value="MT" >Montana</option>';
  308.  
  309.      echo '            <option value="NE" >Nebraska</option>';
  310.  
  311.      echo '            <option value="NV" >Nevada</option>';
  312.  
  313.      echo '            <option value="NH" >New Hampshire</option>';
  314.  
  315.      echo '            <option value="NJ" >New Jersey</option>';
  316.  
  317.      echo '            <option value="NM" >New Mexico</option>';
  318.  
  319.      echo '            <option value="NY" >New York</option>';
  320.  
  321.      echo '            <option value="NC" >North Carolina</option>';
  322.  
  323.      echo '            <option value="ND" >North Dakota</option>';
  324.  
  325.      echo '            <option value="OH" >Ohio</option>';
  326.  
  327.      echo '            <option value="OK" >Oklahoma</option>';
  328.  
  329.      echo '            <option value="OR" >Oregon</option>';
  330.  
  331.      echo '            <option value="PA" >Pennsylvania</option>';
  332.  
  333.      echo '            <option value="RI" >Rhode Island</option>';
  334.  
  335.      echo '            <option value="SC" >South Carolina</option>';
  336.  
  337.      echo '            <option value="SD" >South Dakota</option>';
  338.  
  339.      echo '            <option value="TN" >Tennessee</option>';
  340.  
  341.      echo '            <option value="TX" >Texas</option>';
  342.  
  343.      echo '            <option value="UT" >Utah</option>';
  344.  
  345.      echo '            <option value="VT" >Vermont</option>';
  346.  
  347.      echo '            <option value="VA" >Virginia</option>';
  348.  
  349.      echo '            <option value="WA" >Washington</option>';
  350.  
  351.      echo '            <option value="WV" >West Virginia</option>';
  352.  
  353.      echo '            <option value="WI" >Wisconsin</option>';
  354.  
  355.      echo '            <option value="WY" >Wyoming</option>';
  356.  
  357.      echo '          </select></font></td>';
  358.  
  359.      echo '            </tr>';
  360.  
  361.      echo '            <tr>';
  362.  
  363.      echo '              <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; Zip:</font></td>';
  364.  
  365.      echo '              <td width="251" height="31"><font face="Verdana" size="2">';
  366.  
  367.      echo '                <input maxlength=10 size=10 name="f_zipcode" tabindex="5">';
  368.  
  369.      echo '              </font></td>';
  370.  
  371.      echo '            </tr>';
  372.  
  373.      echo '        <tr>';
  374.  
  375.      echo '                <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; Phone#:</font></td>';
  376.  
  377.      echo '              <td width="243" height="31"><font face="Verdana" size="2">';
  378.  
  379.      echo '                <input maxlength=16 size=16 name="f_phone" tabindex="7">';
  380.  
  381.      echo '              </font></td>';
  382.  
  383.      echo '            </tr>';
  384.  
  385.      echo '            <tr>';
  386.  
  387.      echo '              <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; E-mail:</font></td>';
  388.  
  389.      echo '              <td width="253" height="31"><font face="Verdana" size="2">';
  390.  
  391.      echo '                <input maxlength=40 size=40 name="f_email" tabindex="8" value="">';
  392.  
  393.      echo '              </font></td>';
  394.  
  395.      echo '            </tr>';
  396.  
  397.      echo '            <tr>';
  398.  
  399.      echo '              <td colspan="2" width="520"><div class="noprint"><p align="center"><font face="Verdana" size="2">';
  400.  
  401.      echo '                  <input type=button value="Click Here to Submit" name=submit tabindex="9">';
  402.  
  403.      echo '              </font></p></div></td>';
  404.  
  405.      echo '            </tr>';
  406.  
  407.      echo '       </form>';
  408.  
  409.      echo '          </table>';
  410.  
  411.    }
  412.  
  413.  
  414.  
  415. ?>
  • Brian Jester
  • Beginner
  • Beginner
  • Brian Jester
  • Posts: 61
  • Loc: Bayonne, New Jersey USA

Post 3+ Months Ago

That page works, but not the submit button, and I had a look at your code, and it seems a bit overwhelming for me. If the page that I am putting the above code on is called checkout.php, would I need to create another final checkout page for it to work? Basically all I want now is the Click here to submit, to be linked to a printer friendly page with the forms content, when the customer clicks that button it would print out and then they can either fax or mail that order to me with the product name/description and their address information.
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

Here it is:

Code: [ Select ]
<?php

/**
* @author Travis Person
* @copyright 2007

* Developed with PHP Designer 2007 
*        http://mpsoftware.de
*
*/

    // Start a session.
    session_start();
    // Grab information from URL.
    $name = $_GET['photoname'];
    $desc = $_GET['description'];
    
    // If this is the first time viewing page make the cart session var an array.
    if (!$_SESSION['cart'])
    {
     $_SESSION['cart'] = array();
    }
    
    // Transfer array.
    $arrayCART = $_SESSION['cart'];
    
    // Add tiems to the item array.
    $arrayITEM['NAME'] = $name;
    $arrayITEM['DESC'] = $desc;
    
    // If they have submited a form they arnt going to need to add another item so we wont.
    if (!$_POST['submit'])
    {
     // Put informtion into the cart.
     array_push($arrayCART, $arrayITEM);
    
    
     // Store the cart back in the session.
     $_SESSION['cart'] = $arrayCART;
    }
    
    // DISPLAYS BEFORE ORDER INFORMATION //
    echo '<table border=\'0\'>' . "\n";
    // // // // // // // // // // // // //
    
    foreach ($arrayCART as $id => $name)
    {
     // DISPLAYS INBETWEEN ITEMS BEFORE //
    
     // // // // // // // // // // // // //
     foreach ($arrayCART[$id] as $key => $info)
     {
      //  DISPLAYS PER EACH ITEM FIELD  //
      echo "\t" . '<tr>' . "\n";
      echo "\t\t" . '<td>' . $key . ':' . $info . '</td>' . "\n";
      echo "\t" . '</tr>' . "\n";
      // // // // // // // // // // // // //
    
     }
     // DISPLAYS INBETWEEN ITEMS AFTER //
     echo "\t" . '<tr>' . "\n";
     echo "\t\t" . '<td>&nbsp;</td>' . "\n";
     echo "\t" . '</tr>' . "\n";
     // // // // // // // // // // // // //
    }
    // DISPLAYS AFTER ORDER INFORMATION //
    echo '</table>' . "\n";
    // // // // // // // // // // // // //
    
    echo '<br>' . "\n";
    echo '<br>' . "\n";
    echo '<br>' . "\n";
    
    // If the form is submited we want to display the information they entered.
    if ($_POST['submit'])
    {
    
     // Process submition.
     $f_name = $_POST['f_name'];
     $f_addr = $_POST['f_addr'];
     $f_city = $_POST['f_city'];
     $f_state = $_POST['f_state'];
     $f_zipcode = $_POST['f_zipcode'];
     $f_phone = $_POST['f_phone'];
     $f_email = $_POST['f_email'];
    
     // Put submited information into a varible to display (You dont really need to store if but its standard for me).
     $message .= 'Name:' . $f_name . "<br>\n";
     $message .= 'Address:' . $f_addr . "<br>\n";
     $message .= 'City:' . $f_city . "<br>\n";
     $message .= 'State:' . $f_state . "<br>\n";
     $message .= 'Zip:' . $f_zipcode . "<br>\n";
     $message .= 'Phone:' . $f_phone . "<br>\n";
     $message .= 'Email:' . $f_email . "<br>\n";
    
     // Display the message.
     echo $message;
    
    }
    else
    {
     // If they have not submited there order then we want to give them the option too.
    
    
     // THIS IS JUST A BUNCH OF HTML CODE DISPLAYED LINE BY LINE //
     // THIS IS JUST A BUNCH OF HTML CODE DISPLAYED LINE BY LINE //
     // THIS IS JUST A BUNCH OF HTML CODE DISPLAYED LINE BY LINE //
    
     // There is nothing really crazy about this code below, just standard html.
     echo '     <h2>Continie Checkout</h2>' . "\n";
     echo '     <table border="0" cellpadding="3" cellspacing="0" width="500" bgcolor="#EEEFEE" style="border: D6DFE8 solid 1px">' . "\n";
     echo '      <tr valign="top">' . "\n";
     echo '       <td></td><td><div class="noprint"><p align="left"><font face="Verdana" size="2" color="FF0000"><b>Info Text</b></font></div></td>' . "\n";
     echo '      </tr>' . "\n";
     echo '            <form method="post" name="myform">' . "\n";
     echo '      <tr>' . "\n";
     echo '       <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; Name:</font></td>' . "\n";
     echo '       <td width="251" height="31"><font face="Verdana" size="2">' . "\n";
     echo '        <input maxlength=40 size=40 name="f_name" tabindex="1" value="">' . "\n";
     echo '       </font></td>' . "\n";
     echo '      </tr>' . "\n";
     echo '      <tr>' . "\n";
     echo '       <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; Address:</font></td>' . "\n";
     echo '       <td width="251" height="31"><font face="Verdana" size="2">' . "\n";
     echo '             <input maxlength=40 size=40 name="f_addr" tabindex="2"> ' . "\n";
     echo '             </font></td>' . "\n";
     echo '      </tr>' . "\n";
     echo '      <tr>' . "\n";
     echo '       <td width="100" height="31"><font face="Verdana" size="2"> &nbsp;&nbsp;&nbsp;City:</font></td>' . "\n";
     echo '       <td width="251" height="31"><font face="Verdana" size="2">' . "\n";
     echo '        <input maxlength=20 size=20 name="f_city" tabindex="3"></font></td>' . "\n";
     echo '      </tr>' . "\n";
     echo '      <tr>' . "\n";
     echo '       <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; State:</font></td>' . "\n";
     echo '       <td width="251" height="31"><font face="Verdana" size="2">' . "\n";
     echo '             <select name="f_state" tabindex="4">' . "\n";
     echo '                 <option value="0">State...</option>' . "\n";
     echo '                 <option value="Na">Other / Not USA</option>' . "\n";
     echo '                 <option value="AL" >Alabama</option>' . "\n";
     echo '                 <option value="AK" >Alaska</option>' . "\n";
     echo '                 <option value="AZ" >Arizona</option>' . "\n";
     echo '                 <option value="AR" >Arkansas</option>' . "\n";
     echo '                 <option value="CA" >California</option>' . "\n";
     echo '                 <option value="CO" >Colorado</option>' . "\n";
     echo '                 <option value="CT" >Connecticut</option>' . "\n";
     echo '                 <option value="DE" >Delaware</option>' . "\n";
     echo '                 <option value="DC" >District of Columbia</option>' . "\n";
     echo '                 <option value="FL" >Florida</option>' . "\n";
     echo '                 <option value="GA" >Georgia</option>' . "\n";
     echo '                 <option value="HI" >Hawaii</option>' . "\n";
     echo '                 <option value="ID" >Idaho</option>' . "\n";
     echo '                 <option value="IL" >Illinois</option>' . "\n";
     echo '                 <option value="IN" >Indiana</option>' . "\n";
     echo '                 <option value="IO" >Iowa</option>' . "\n";
     echo '                 <option value="KS" >Kansas</option>' . "\n";
     echo '                 <option value="KY" >Kentucky</option>' . "\n";
     echo '                 <option value="LA" >Louisiana</option>' . "\n";
     echo '                 <option value="ME" >Maine</option>' . "\n";
     echo '                 <option value="MD" >Maryland</option>' . "\n";
     echo '                 <option value="MA" >Massachusetts</option>' . "\n";
     echo '                 <option value="MI" >Michigan</option>' . "\n";
     echo '                 <option value="MN" >Minnesota</option>' . "\n";
     echo '                 <option value="MS" >Mississippi</option>' . "\n";
     echo '                 <option value="MO" >Missouri</option>' . "\n";
     echo '                 <option value="MT" >Montana</option>' . "\n";
     echo '                 <option value="NE" >Nebraska</option>' . "\n";
     echo '                 <option value="NV" >Nevada</option>' . "\n";
     echo '                 <option value="NH" >New Hampshire</option>' . "\n";
     echo '                 <option value="NJ" >New Jersey</option>' . "\n";
     echo '                 <option value="NM" >New Mexico</option>' . "\n";
     echo '                 <option value="NY" >New York</option>' . "\n";
     echo '                 <option value="NC" >North Carolina</option>' . "\n";
     echo '                 <option value="ND" >North Dakota</option>' . "\n";
     echo '                 <option value="OH" >Ohio</option>' . "\n";
     echo '                 <option value="OK" >Oklahoma</option>' . "\n";
     echo '                 <option value="OR" >Oregon</option>' . "\n";
     echo '                 <option value="PA" >Pennsylvania</option>' . "\n";
     echo '                 <option value="RI" >Rhode Island</option>' . "\n";
     echo '                 <option value="SC" >South Carolina</option>' . "\n";
     echo '                 <option value="SD" >South Dakota</option>' . "\n";
     echo '                 <option value="TN" >Tennessee</option>' . "\n";
     echo '                 <option value="TX" >Texas</option>' . "\n";
     echo '                 <option value="UT" >Utah</option>' . "\n";
     echo '                 <option value="VT" >Vermont</option>' . "\n";
     echo '                 <option value="VA" >Virginia</option>' . "\n";
     echo '                 <option value="WA" >Washington</option>' . "\n";
     echo '                 <option value="WV" >West Virginia</option>' . "\n";
     echo '                 <option value="WI" >Wisconsin</option>' . "\n";
     echo '                 <option value="WY" >Wyoming</option>' . "\n";
     echo '                </select></font></td>' . "\n";
     echo '      </tr>' . "\n";
     echo '      <tr>' . "\n";
     echo '       <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; Zip:</font></td>' . "\n";
     echo '       <td width="251" height="31"><font face="Verdana" size="2">' . "\n";
     echo '        <input maxlength=10 size=10 name="f_zipcode" tabindex="5">' . "\n";
     echo '       </font></td>' . "\n";
     echo '      </tr>' . "\n";
     echo '             <tr>' . "\n";
     echo '        <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; Phone#:</font></td>' . "\n";
     echo '       <td width="243" height="31"><font face="Verdana" size="2">' . "\n";
     echo '        <input maxlength=16 size=16 name="f_phone" tabindex="7">' . "\n";
     echo '       </font></td>' . "\n";
     echo '      </tr>' . "\n";
     echo '      <tr>' . "\n";
     echo '       <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; E-mail:</font></td>' . "\n";
     echo '       <td width="253" height="31"><font face="Verdana" size="2">' . "\n";
     echo '        <input maxlength=40 size=40 name="f_email" tabindex="8" value="">' . "\n";
     echo '       </font></td>' . "\n";
     echo '      </tr>' . "\n";
     echo '      <tr>' . "\n";
     echo '       <td colspan="2" width="520"><div class="noprint"><p align="center"><font face="Verdana" size="2">' . "\n";
     echo '         <input type=submit value="Click Here to Submit" name=submit tabindex="9">' . "\n";
     echo '       </font></p></div></td>' . "\n";
     echo '      </tr>' . "\n";
     echo '            </form>' . "\n";
     echo '     </table>' . "\n";
    }

?>
  1. <?php
  2. /**
  3. * @author Travis Person
  4. * @copyright 2007
  5. * Developed with PHP Designer 2007 
  6. *        http://mpsoftware.de
  7. *
  8. */
  9.     // Start a session.
  10.     session_start();
  11.     // Grab information from URL.
  12.     $name = $_GET['photoname'];
  13.     $desc = $_GET['description'];
  14.     
  15.     // If this is the first time viewing page make the cart session var an array.
  16.     if (!$_SESSION['cart'])
  17.     {
  18.      $_SESSION['cart'] = array();
  19.     }
  20.     
  21.     // Transfer array.
  22.     $arrayCART = $_SESSION['cart'];
  23.     
  24.     // Add tiems to the item array.
  25.     $arrayITEM['NAME'] = $name;
  26.     $arrayITEM['DESC'] = $desc;
  27.     
  28.     // If they have submited a form they arnt going to need to add another item so we wont.
  29.     if (!$_POST['submit'])
  30.     {
  31.      // Put informtion into the cart.
  32.      array_push($arrayCART, $arrayITEM);
  33.     
  34.     
  35.      // Store the cart back in the session.
  36.      $_SESSION['cart'] = $arrayCART;
  37.     }
  38.     
  39.     // DISPLAYS BEFORE ORDER INFORMATION //
  40.     echo '<table border=\'0\'>' . "\n";
  41.     // // // // // // // // // // // // //
  42.     
  43.     foreach ($arrayCART as $id => $name)
  44.     {
  45.      // DISPLAYS INBETWEEN ITEMS BEFORE //
  46.     
  47.      // // // // // // // // // // // // //
  48.      foreach ($arrayCART[$id] as $key => $info)
  49.      {
  50.       //  DISPLAYS PER EACH ITEM FIELD  //
  51.       echo "\t" . '<tr>' . "\n";
  52.       echo "\t\t" . '<td>' . $key . ':' . $info . '</td>' . "\n";
  53.       echo "\t" . '</tr>' . "\n";
  54.       // // // // // // // // // // // // //
  55.     
  56.      }
  57.      // DISPLAYS INBETWEEN ITEMS AFTER //
  58.      echo "\t" . '<tr>' . "\n";
  59.      echo "\t\t" . '<td>&nbsp;</td>' . "\n";
  60.      echo "\t" . '</tr>' . "\n";
  61.      // // // // // // // // // // // // //
  62.     }
  63.     // DISPLAYS AFTER ORDER INFORMATION //
  64.     echo '</table>' . "\n";
  65.     // // // // // // // // // // // // //
  66.     
  67.     echo '<br>' . "\n";
  68.     echo '<br>' . "\n";
  69.     echo '<br>' . "\n";
  70.     
  71.     // If the form is submited we want to display the information they entered.
  72.     if ($_POST['submit'])
  73.     {
  74.     
  75.      // Process submition.
  76.      $f_name = $_POST['f_name'];
  77.      $f_addr = $_POST['f_addr'];
  78.      $f_city = $_POST['f_city'];
  79.      $f_state = $_POST['f_state'];
  80.      $f_zipcode = $_POST['f_zipcode'];
  81.      $f_phone = $_POST['f_phone'];
  82.      $f_email = $_POST['f_email'];
  83.     
  84.      // Put submited information into a varible to display (You dont really need to store if but its standard for me).
  85.      $message .= 'Name:' . $f_name . "<br>\n";
  86.      $message .= 'Address:' . $f_addr . "<br>\n";
  87.      $message .= 'City:' . $f_city . "<br>\n";
  88.      $message .= 'State:' . $f_state . "<br>\n";
  89.      $message .= 'Zip:' . $f_zipcode . "<br>\n";
  90.      $message .= 'Phone:' . $f_phone . "<br>\n";
  91.      $message .= 'Email:' . $f_email . "<br>\n";
  92.     
  93.      // Display the message.
  94.      echo $message;
  95.     
  96.     }
  97.     else
  98.     {
  99.      // If they have not submited there order then we want to give them the option too.
  100.     
  101.     
  102.      // THIS IS JUST A BUNCH OF HTML CODE DISPLAYED LINE BY LINE //
  103.      // THIS IS JUST A BUNCH OF HTML CODE DISPLAYED LINE BY LINE //
  104.      // THIS IS JUST A BUNCH OF HTML CODE DISPLAYED LINE BY LINE //
  105.     
  106.      // There is nothing really crazy about this code below, just standard html.
  107.      echo '     <h2>Continie Checkout</h2>' . "\n";
  108.      echo '     <table border="0" cellpadding="3" cellspacing="0" width="500" bgcolor="#EEEFEE" style="border: D6DFE8 solid 1px">' . "\n";
  109.      echo '      <tr valign="top">' . "\n";
  110.      echo '       <td></td><td><div class="noprint"><p align="left"><font face="Verdana" size="2" color="FF0000"><b>Info Text</b></font></div></td>' . "\n";
  111.      echo '      </tr>' . "\n";
  112.      echo '            <form method="post" name="myform">' . "\n";
  113.      echo '      <tr>' . "\n";
  114.      echo '       <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; Name:</font></td>' . "\n";
  115.      echo '       <td width="251" height="31"><font face="Verdana" size="2">' . "\n";
  116.      echo '        <input maxlength=40 size=40 name="f_name" tabindex="1" value="">' . "\n";
  117.      echo '       </font></td>' . "\n";
  118.      echo '      </tr>' . "\n";
  119.      echo '      <tr>' . "\n";
  120.      echo '       <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; Address:</font></td>' . "\n";
  121.      echo '       <td width="251" height="31"><font face="Verdana" size="2">' . "\n";
  122.      echo '             <input maxlength=40 size=40 name="f_addr" tabindex="2"> ' . "\n";
  123.      echo '             </font></td>' . "\n";
  124.      echo '      </tr>' . "\n";
  125.      echo '      <tr>' . "\n";
  126.      echo '       <td width="100" height="31"><font face="Verdana" size="2"> &nbsp;&nbsp;&nbsp;City:</font></td>' . "\n";
  127.      echo '       <td width="251" height="31"><font face="Verdana" size="2">' . "\n";
  128.      echo '        <input maxlength=20 size=20 name="f_city" tabindex="3"></font></td>' . "\n";
  129.      echo '      </tr>' . "\n";
  130.      echo '      <tr>' . "\n";
  131.      echo '       <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; State:</font></td>' . "\n";
  132.      echo '       <td width="251" height="31"><font face="Verdana" size="2">' . "\n";
  133.      echo '             <select name="f_state" tabindex="4">' . "\n";
  134.      echo '                 <option value="0">State...</option>' . "\n";
  135.      echo '                 <option value="Na">Other / Not USA</option>' . "\n";
  136.      echo '                 <option value="AL" >Alabama</option>' . "\n";
  137.      echo '                 <option value="AK" >Alaska</option>' . "\n";
  138.      echo '                 <option value="AZ" >Arizona</option>' . "\n";
  139.      echo '                 <option value="AR" >Arkansas</option>' . "\n";
  140.      echo '                 <option value="CA" >California</option>' . "\n";
  141.      echo '                 <option value="CO" >Colorado</option>' . "\n";
  142.      echo '                 <option value="CT" >Connecticut</option>' . "\n";
  143.      echo '                 <option value="DE" >Delaware</option>' . "\n";
  144.      echo '                 <option value="DC" >District of Columbia</option>' . "\n";
  145.      echo '                 <option value="FL" >Florida</option>' . "\n";
  146.      echo '                 <option value="GA" >Georgia</option>' . "\n";
  147.      echo '                 <option value="HI" >Hawaii</option>' . "\n";
  148.      echo '                 <option value="ID" >Idaho</option>' . "\n";
  149.      echo '                 <option value="IL" >Illinois</option>' . "\n";
  150.      echo '                 <option value="IN" >Indiana</option>' . "\n";
  151.      echo '                 <option value="IO" >Iowa</option>' . "\n";
  152.      echo '                 <option value="KS" >Kansas</option>' . "\n";
  153.      echo '                 <option value="KY" >Kentucky</option>' . "\n";
  154.      echo '                 <option value="LA" >Louisiana</option>' . "\n";
  155.      echo '                 <option value="ME" >Maine</option>' . "\n";
  156.      echo '                 <option value="MD" >Maryland</option>' . "\n";
  157.      echo '                 <option value="MA" >Massachusetts</option>' . "\n";
  158.      echo '                 <option value="MI" >Michigan</option>' . "\n";
  159.      echo '                 <option value="MN" >Minnesota</option>' . "\n";
  160.      echo '                 <option value="MS" >Mississippi</option>' . "\n";
  161.      echo '                 <option value="MO" >Missouri</option>' . "\n";
  162.      echo '                 <option value="MT" >Montana</option>' . "\n";
  163.      echo '                 <option value="NE" >Nebraska</option>' . "\n";
  164.      echo '                 <option value="NV" >Nevada</option>' . "\n";
  165.      echo '                 <option value="NH" >New Hampshire</option>' . "\n";
  166.      echo '                 <option value="NJ" >New Jersey</option>' . "\n";
  167.      echo '                 <option value="NM" >New Mexico</option>' . "\n";
  168.      echo '                 <option value="NY" >New York</option>' . "\n";
  169.      echo '                 <option value="NC" >North Carolina</option>' . "\n";
  170.      echo '                 <option value="ND" >North Dakota</option>' . "\n";
  171.      echo '                 <option value="OH" >Ohio</option>' . "\n";
  172.      echo '                 <option value="OK" >Oklahoma</option>' . "\n";
  173.      echo '                 <option value="OR" >Oregon</option>' . "\n";
  174.      echo '                 <option value="PA" >Pennsylvania</option>' . "\n";
  175.      echo '                 <option value="RI" >Rhode Island</option>' . "\n";
  176.      echo '                 <option value="SC" >South Carolina</option>' . "\n";
  177.      echo '                 <option value="SD" >South Dakota</option>' . "\n";
  178.      echo '                 <option value="TN" >Tennessee</option>' . "\n";
  179.      echo '                 <option value="TX" >Texas</option>' . "\n";
  180.      echo '                 <option value="UT" >Utah</option>' . "\n";
  181.      echo '                 <option value="VT" >Vermont</option>' . "\n";
  182.      echo '                 <option value="VA" >Virginia</option>' . "\n";
  183.      echo '                 <option value="WA" >Washington</option>' . "\n";
  184.      echo '                 <option value="WV" >West Virginia</option>' . "\n";
  185.      echo '                 <option value="WI" >Wisconsin</option>' . "\n";
  186.      echo '                 <option value="WY" >Wyoming</option>' . "\n";
  187.      echo '                </select></font></td>' . "\n";
  188.      echo '      </tr>' . "\n";
  189.      echo '      <tr>' . "\n";
  190.      echo '       <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; Zip:</font></td>' . "\n";
  191.      echo '       <td width="251" height="31"><font face="Verdana" size="2">' . "\n";
  192.      echo '        <input maxlength=10 size=10 name="f_zipcode" tabindex="5">' . "\n";
  193.      echo '       </font></td>' . "\n";
  194.      echo '      </tr>' . "\n";
  195.      echo '             <tr>' . "\n";
  196.      echo '        <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; Phone#:</font></td>' . "\n";
  197.      echo '       <td width="243" height="31"><font face="Verdana" size="2">' . "\n";
  198.      echo '        <input maxlength=16 size=16 name="f_phone" tabindex="7">' . "\n";
  199.      echo '       </font></td>' . "\n";
  200.      echo '      </tr>' . "\n";
  201.      echo '      <tr>' . "\n";
  202.      echo '       <td width="100" height="31"><font face="Verdana" size="2">&nbsp;&nbsp; E-mail:</font></td>' . "\n";
  203.      echo '       <td width="253" height="31"><font face="Verdana" size="2">' . "\n";
  204.      echo '        <input maxlength=40 size=40 name="f_email" tabindex="8" value="">' . "\n";
  205.      echo '       </font></td>' . "\n";
  206.      echo '      </tr>' . "\n";
  207.      echo '      <tr>' . "\n";
  208.      echo '       <td colspan="2" width="520"><div class="noprint"><p align="center"><font face="Verdana" size="2">' . "\n";
  209.      echo '         <input type=submit value="Click Here to Submit" name=submit tabindex="9">' . "\n";
  210.      echo '       </font></p></div></td>' . "\n";
  211.      echo '      </tr>' . "\n";
  212.      echo '            </form>' . "\n";
  213.      echo '     </table>' . "\n";
  214.     }
  215. ?>


Basicly this will take an input

http://www.domain.com/pagename.php?phot ... escription

It will take that and store the information in a session array. Once the user is done they can fill out the form. Once they click submit it will display the content of the order and there information on the page. They can then print it off. You can add any more information you like. I commented it so you can understand what is going on. If you want it more styled you will have to do that yourself.
  • Brian Jester
  • Beginner
  • Beginner
  • Brian Jester
  • Posts: 61
  • Loc: Bayonne, New Jersey USA

Post 3+ Months Ago

?
  • SB
  • Moderator
  • Genius
  • User avatar
  • Posts: 8742
  • Loc: Aberdeen, Scotland

Post 3+ Months Ago

Brian, if you quote Spoofs last message it shows you the code that he typed in. Just remember to remove the quote tags etc etc.

Very odd that you have to do this, but this was how i saw what Spoof had typed.
  • Brian Jester
  • Beginner
  • Beginner
  • Brian Jester
  • Posts: 61
  • Loc: Bayonne, New Jersey USA

Post 3+ Months Ago

Another quick question...Would it be possible to put each item that was clicked on from the gallery into a seperate row in a table? Ex: How a shopping cart usually does. Meaning for every item the person wanted to purchase, that item would get put into a table row, like a shopping cart. And add a 'quantity' text box to that table for each item so they could specify a quantity for how many of that item they wish to order.
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

Each time is in its own row in a way. I just seperated the name and the description.
  • Brian Jester
  • Beginner
  • Beginner
  • Brian Jester
  • Posts: 61
  • Loc: Bayonne, New Jersey USA

Post 3+ Months Ago

Actually, what I mean is this, let's say I click on an item from the gallery, and then I wanted that item to show up in a table like this:

<div align="center">
<table border="0">
<tr>
<td>Item:</td>
<td>echo $name = $_GET['photoname'];</td>
</tr>
</table>
</div>

That would put one item in, but how about if I go to add another item, and I wanted that product to go in a new row in that table? How can that be accomplished? I just wanted to make it so that if I add more than one product (each being a different item) they would line up in rows in a table, but if they are the same item, they could just adjust the quantity by a text box and putting a number to change the quantity.
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

Do you want the desciption to be shown in the cart? You can do what you want by editing the file I gave you.


PHP Code: [ Select ]
 
// DISPLAYS BEFORE ORDER INFORMATION //
 
   echo '<table  border=\'0\'>' . "\n";
 
   // // // // // // // // // // // // //
 
   
 
   foreach ($arrayCART as $id => $name)
 
   {
 
     // DISPLAYS INBETWEEN ITEMS BEFORE  //
 
   
 
     // // // // // // // // // // // // //
 
     foreach ($arrayCART[$id] as $key => $info)
 
     {
 
       //   DISPLAYS PER EACH ITEM FIELD   //
 
       echo "\t" . '<tr>' . "\n";
 
       echo "\t\t" . '<td>' . $key . ':' . $info . '</td>' . "\n";
 
       echo "\t" . '</tr>' . "\n";
 
       // // // // // // // // // // // // //
 
   
 
     }
 
     //  DISPLAYS INBETWEEN ITEMS AFTER  //
 
     echo "\t" . '<tr>' . "\n";
 
     echo "\t\t" . '<td>&nbsp;</td>' . "\n";
 
     echo "\t" . '</tr>' . "\n";
 
     // // // // // // // // // // // // //
 
   }
 
   // DISPLAYS AFTER ORDER INFORMATION  //
 
   echo '</table>' . "\n";
 
   // // // // // // // // // // // // //
 
 
  1.  
  2. // DISPLAYS BEFORE ORDER INFORMATION //
  3.  
  4.    echo '<table  border=\'0\'>' . "\n";
  5.  
  6.    // // // // // // // // // // // // //
  7.  
  8.    
  9.  
  10.    foreach ($arrayCART as $id => $name)
  11.  
  12.    {
  13.  
  14.      // DISPLAYS INBETWEEN ITEMS BEFORE  //
  15.  
  16.    
  17.  
  18.      // // // // // // // // // // // // //
  19.  
  20.      foreach ($arrayCART[$id] as $key => $info)
  21.  
  22.      {
  23.  
  24.        //   DISPLAYS PER EACH ITEM FIELD   //
  25.  
  26.        echo "\t" . '<tr>' . "\n";
  27.  
  28.        echo "\t\t" . '<td>' . $key . ':' . $info . '</td>' . "\n";
  29.  
  30.        echo "\t" . '</tr>' . "\n";
  31.  
  32.        // // // // // // // // // // // // //
  33.  
  34.    
  35.  
  36.      }
  37.  
  38.      //  DISPLAYS INBETWEEN ITEMS AFTER  //
  39.  
  40.      echo "\t" . '<tr>' . "\n";
  41.  
  42.      echo "\t\t" . '<td>&nbsp;</td>' . "\n";
  43.  
  44.      echo "\t" . '</tr>' . "\n";
  45.  
  46.      // // // // // // // // // // // // //
  47.  
  48.    }
  49.  
  50.    // DISPLAYS AFTER ORDER INFORMATION  //
  51.  
  52.    echo '</table>' . "\n";
  53.  
  54.    // // // // // // // // // // // // //
  55.  
  56.  



The code above will produce something like this:

Code: [ Select ]
<table border='0'>
<tr>
<td>Name</td>
</tr>
<tr>
<td>Desciption</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<!-- repeat -->
<tr>
<td>Name2</td>
</tr>
<tr>
<td>Desciption2</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<!-- repeat -->
</table>
  1. <table border='0'>
  2. <tr>
  3. <td>Name</td>
  4. </tr>
  5. <tr>
  6. <td>Desciption</td>
  7. </tr>
  8. <tr>
  9. <td>&nbsp;</td>
  10. </tr>
  11. <!-- repeat -->
  12. <tr>
  13. <td>Name2</td>
  14. </tr>
  15. <tr>
  16. <td>Desciption2</td>
  17. </tr>
  18. <tr>
  19. <td>&nbsp;</td>
  20. </tr>
  21. <!-- repeat -->
  22. </table>


If you want the name and the description to be in the same row you can remove the <tr> tags here:

PHP Code: [ Select ]
     foreach ($arrayCART[$id] as $key => $info)
     {
       //   DISPLAYS PER EACH ITEM FIELD   //
       echo "\t" . '<tr>' . "\n";
       echo "\t\t" . '<td>' . $key . ':' . $info . '</td>' . "\n";
       echo "\t" . '</tr>' . "\n";
       // // // // // // // // // // // // //
   
     }
  1.      foreach ($arrayCART[$id] as $key => $info)
  2.      {
  3.        //   DISPLAYS PER EACH ITEM FIELD   //
  4.        echo "\t" . '<tr>' . "\n";
  5.        echo "\t\t" . '<td>' . $key . ':' . $info . '</td>' . "\n";
  6.        echo "\t" . '</tr>' . "\n";
  7.        // // // // // // // // // // // // //
  8.    
  9.      }


Make it something like this:

PHP Code: [ Select ]
     foreach ($arrayCART[$id] as $key => $info)
     {
       //   DISPLAYS PER EACH ITEM FIELD   //
 
       echo "\t\t" . '<td>' . $key . ':' . $info . '</td>' . "\n";
 
       // // // // // // // // // // // // //
   
     }
  1.      foreach ($arrayCART[$id] as $key => $info)
  2.      {
  3.        //   DISPLAYS PER EACH ITEM FIELD   //
  4.  
  5.        echo "\t\t" . '<td>' . $key . ':' . $info . '</td>' . "\n";
  6.  
  7.        // // // // // // // // // // // // //
  8.    
  9.      }


That will make something like this:

Code: [ Select ]
<table border='0'>
<tr>
<td>Name</td>
<td>Desciption</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<!-- repeat -->
<tr>
<td>Name2</td>
<td>Desciption2</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<!-- repeat -->
</table>
  1. <table border='0'>
  2. <tr>
  3. <td>Name</td>
  4. <td>Desciption</td>
  5. </tr>
  6. <tr>
  7. <td>&nbsp;</td>
  8. </tr>
  9. <!-- repeat -->
  10. <tr>
  11. <td>Name2</td>
  12. <td>Desciption2</td>
  13. </tr>
  14. <tr>
  15. <td>&nbsp;</td>
  16. </tr>
  17. <!-- repeat -->
  18. </table>
  • Brian Jester
  • Beginner
  • Beginner
  • Brian Jester
  • Posts: 61
  • Loc: Bayonne, New Jersey USA

Post 3+ Months Ago

I got errors with both of those bits of code. I tried putting them above the actual checkout code, then tried putting it under the checkout code, still got errors. When I put the table code above the checkout code, I got a session error, and when I put it below, I got a parse error. :S
  • Brian Jester
  • Beginner
  • Beginner
  • Brian Jester
  • Posts: 61
  • Loc: Bayonne, New Jersey USA

Post 3+ Months Ago

Any luck with getting the table code to work?
  • Brian Jester
  • Beginner
  • Beginner
  • Brian Jester
  • Posts: 61
  • Loc: Bayonne, New Jersey USA

Post 3+ Months Ago

Hi SpooF,

I tried getting the code to work from where we last left off, and wasn't able to get past the problem with getting the items that were clicked on to show in the printable page. Here's the code again, I have modified it only in the very bottom where the <div tag is right above the <table tag.

Code: [ Select ]
<?php

/**
* @author Travis Person
* @copyright 2007

* Developed with PHP Designer 2007 
*        http://mpsoftware.de
*
*/

    // Start a session.
    session_start();

    // Grab information from URL.
    $name = strip_tags($_GET['photoname']); 
    $desc = strip_tags($_GET['description']);

    // If this is the first time viewing page make the 

cart session var an array.
    if (!$_SESSION['cart'])
    {
     $_SESSION['cart'] = array();
    }
    

    // Add items to the item array.
    $arrayITEM['NAME'] = $name;
    $arrayITEM['DESC'] = $desc;

    // Transfer array.
    $arrayCART = $_SESSION['cart'];
    
            
    // If they have submited a form they arnt going to need to add

another item so we wont.
    if (!$_POST['submit'])
    {
     // Put informtion into the cart.
     array_push($arrayCART, $arrayITEM);
    
    
     // Store the cart back in the session.
     $_SESSION['cart'] = $arrayCART;
    }
    
    // DISPLAYS BEFORE ORDER INFORMATION //
    echo '<table border=\'0\'>' . "\n";
    // // // // // // // // // // // // //
    
    foreach ($arrayCART as $id => $name)
    {
     // DISPLAYS INBETWEEN ITEMS BEFORE //
    
     // // // // // // // // // // // // //
     foreach ($arrayCART[$id] as $key => $info)
     {
      //  DISPLAYS PER EACH ITEM FIELD  //
      echo "\t" . '<tr>' . "\n";
      echo "\t\t" . '<td>' . $key . ':' . $info . '</td>' . "\n";
      echo "\t" . '</tr>' . "\n";
      // // // // // // // // // // // // //
    
     }
     // DISPLAYS INBETWEEN ITEMS AFTER //
     echo "\t" . '<tr>' . "\n";
     echo "\t\t" . '<td>&nbsp;</td>' . "\n";
     echo "\t" . '</tr>' . "\n";
     // // // // // // // // // // // // //
    }
    // DISPLAYS AFTER ORDER INFORMATION //
    echo '</table>' . "\n";
    // // // // // // // // // // // // //
    
    echo '<br>' . "\n";
    echo '<br>' . "\n";
    echo '<br>' . "\n";
    
    // If the form is submited we want to display the information

they entered.
    if ($_POST['submit'])
    {
    
     // Process submition.
     $f_name = $_POST['f_name'];
     $f_addr = $_POST['f_addr'];
     $f_city = $_POST['f_city'];
     $f_state = $_POST['f_state'];
     $f_zipcode = $_POST['f_zipcode'];
     $f_phone = $_POST['f_phone'];
     $f_email = $_POST['f_email'];
    
     // Put submited information into a varible to display (You

dont really need to store if but its standard for me).
     $message .= 'Name:' . $f_name . "<br>\n";
     $message .= 'Address:' . $f_addr . "<br>\n";
     $message .= 'City:' . $f_city . "<br>\n";
     $message .= 'State:' . $f_state . "<br>\n";
     $message .= 'Zip:' . $f_zipcode . "<br>\n";
     $message .= 'Phone:' . $f_phone . "<br>\n";
     $message .= 'Email:' . $f_email . "<br>\n";
    
     // Display the message.
     echo $message;
    
    }
    else
    {
     // If they have not submited there order then we want to give

them the option too.
    
    
     // THIS IS JUST A BUNCH OF HTML CODE DISPLAYED LINE BY LINE

//
     // THIS IS JUST A BUNCH OF HTML CODE DISPLAYED LINE BY LINE

//
     // THIS IS JUST A BUNCH OF HTML CODE DISPLAYED LINE BY LINE

//
    
     // There is nothing really crazy about this code below, just

standard html.
     echo '     <h2>Continue Checkout</h2>' . "\n";
     echo '     <table border="0" cellpadding="3"

cellspacing="0" width="500" bgcolor="#EEEFEE" style="border: D6DFE8

solid 1px">' . "\n";
     echo '      <tr valign="top">' . "\n";
     echo '       <td></td><td><div class="noprint"><p

align="left"><font face="Verdana" size="2" color="FF0000"><b>Info

Text</b></font></div></td>' . "\n";
     echo '      </tr>' . "\n";
     echo '            <form method="post"

name="myform">' . "\n";
     echo '            <tr>' . "\n";
     echo '       <td width="100" height="31"><font

face="Verdana" size="2">&nbsp;&nbsp; Name:</font></td>' . "\n";
     echo '       <td width="251" height="31"><font

face="Verdana" size="2">' . "\n";
     echo '        <input maxlength=40 size=40

name="f_name" tabindex="1" value="">' . "\n";
     echo '       </font></td>' . "\n";
     echo '      </tr>' . "\n";
     echo '      <tr>' . "\n";
     echo '       <td width="100" height="31"><font

face="Verdana" size="2">&nbsp;&nbsp; Address:</font></td>' . "\n";
     echo '       <td width="251" height="31"><font

face="Verdana" size="2">' . "\n";
     echo '             <input maxlength=40 size=40

name="f_addr" tabindex="2"> ' . "\n";
     echo '             </font></td>' . "\n";
     echo '      </tr>' . "\n";
     echo '      <tr>' . "\n";
     echo '       <td width="100" height="31"><font

face="Verdana" size="2"> &nbsp;&nbsp;&nbsp;City:</font></td>' . "\n";
     echo '       <td width="251" height="31"><font

face="Verdana" size="2">' . "\n";
     echo '        <input maxlength=20 size=20

name="f_city" tabindex="3"></font></td>' . "\n";
     echo '      </tr>' . "\n";
     echo '      <tr>' . "\n";
     echo '       <td width="100" height="31"><font

face="Verdana" size="2">&nbsp;&nbsp; State:</font></td>' . "\n";
     echo '       <td width="251" height="31"><font

face="Verdana" size="2">' . "\n";
     echo '             <select name="f_state"

tabindex="4">' . "\n";
     echo '                 <option

value="0">State...</option>' . "\n";
     echo '                 <option

value="Na">Other / Not USA</option>' . "\n";
     echo '                 <option value="AL"

>Alabama</option>' . "\n";
     echo '                 <option value="AK"

>Alaska</option>' . "\n";
     echo '                 <option value="AZ"

>Arizona</option>' . "\n";
     echo '                 <option value="AR"

>Arkansas</option>' . "\n";
     echo '                 <option value="CA"

>California</option>' . "\n";
     echo '                 <option value="CO"

>Colorado</option>' . "\n";
     echo '                 <option value="CT"

>Connecticut</option>' . "\n";
     echo '                 <option value="DE"

>Delaware</option>' . "\n";
     echo '                 <option value="DC"

>District of Columbia</option>' . "\n";
     echo '                 <option value="FL"

>Florida</option>' . "\n";
     echo '                 <option value="GA"

>Georgia</option>' . "\n";
     echo '                 <option value="HI"

>Hawaii</option>' . "\n";
     echo '                 <option value="ID"

>Idaho</option>' . "\n";
     echo '                 <option value="IL"

>Illinois</option>' . "\n";
     echo '                 <option value="IN"

>Indiana</option>' . "\n";
     echo '                 <option value="IO"

>Iowa</option>' . "\n";
     echo '                 <option value="KS"

>Kansas</option>' . "\n";
     echo '                 <option value="KY"

>Kentucky</option>' . "\n";
     echo '                 <option value="LA"

>Louisiana</option>' . "\n";
     echo '                 <option value="ME"

>Maine</option>' . "\n";
     echo '                 <option value="MD"

>Maryland</option>' . "\n";
     echo '                 <option value="MA"

>Massachusetts</option>' . "\n";
     echo '                 <option value="MI"

>Michigan</option>' . "\n";
     echo '                 <option value="MN"

>Minnesota</option>' . "\n";
     echo '                 <option value="MS"

>Mississippi</option>' . "\n";
     echo '                 <option value="MO"

>Missouri</option>' . "\n";
     echo '                 <option value="MT"

>Montana</option>' . "\n";
     echo '                 <option value="NE"

>Nebraska</option>' . "\n";
     echo '                 <option value="NV"

>Nevada</option>' . "\n";
     echo '                 <option value="NH"

>New Hampshire</option>' . "\n";
     echo '                 <option value="NJ"

>New Jersey</option>' . "\n";
     echo '                 <option value="NM"

>New Mexico</option>' . "\n";
     echo '                 <option value="NY"

>New York</option>' . "\n";
     echo '                 <option value="NC"

>North Carolina</option>' . "\n";
     echo '                 <option value="ND"

>North Dakota</option>' . "\n";
     echo '                 <option value="OH"

>Ohio</option>' . "\n";
     echo '                 <option value="OK"

>Oklahoma</option>' . "\n";
     echo '                 <option value="OR"

>Oregon</option>' . "\n";
     echo '                 <option value="PA"

>Pennsylvania</option>' . "\n";
     echo '                 <option value="RI"

>Rhode Island</option>' . "\n";
     echo '                 <option value="SC"

>South Carolina</option>' . "\n";
     echo '                 <option value="SD"

>South Dakota</option>' . "\n";
     echo '                 <option value="TN"

>Tennessee</option>' . "\n";
     echo '                 <option value="TX"

>Texas</option>' . "\n";
     echo '                 <option value="UT"

>Utah</option>' . "\n";
     echo '                 <option value="VT"

>Vermont</option>' . "\n";
     echo '                 <option value="VA"

>Virginia</option>' . "\n";
     echo '                 <option value="WA"

>Washington</option>' . "\n";
     echo '                 <option value="WV"

>West Virginia</option>' . "\n";
     echo '                 <option value="WI"

>Wisconsin</option>' . "\n";
     echo '                 <option value="WY"

>Wyoming</option>' . "\n";
     echo '                </select></font></td>'

. "\n";
     echo '      </tr>' . "\n";
     echo '      <tr>' . "\n";
     echo '       <td width="100" height="31"><font

face="Verdana" size="2">&nbsp;&nbsp; Zip:</font></td>' . "\n";
     echo '       <td width="251" height="31"><font

face="Verdana" size="2">' . "\n";
     echo '        <input maxlength=10 size=10

name="f_zipcode" tabindex="5">' . "\n";
     echo '       </font></td>' . "\n";
     echo '      </tr>' . "\n";
     echo '             <tr>' . "\n";
     echo '        <td width="100" height="31"><font

face="Verdana" size="2">&nbsp;&nbsp; Phone#:</font></td>' . "\n";
     echo '       <td width="243" height="31"><font

face="Verdana" size="2">' . "\n";
     echo '        <input maxlength=16 size=16

name="f_phone" tabindex="7">' . "\n";
     echo '       </font></td>' . "\n";
     echo '      </tr>' . "\n";
     echo '      <tr>' . "\n";
     echo '       <td width="100" height="31"><font

face="Verdana" size="2">&nbsp;&nbsp; E-mail:</font></td>' . "\n";
     echo '       <td width="253" height="31"><font

face="Verdana" size="2">' . "\n";
     echo '        <input maxlength=40 size=40

name="f_email" tabindex="8" value="">' . "\n";
     echo '       </font></td>' . "\n";
     echo '      </tr>' . "\n";
     echo '      <tr>' . "\n";
     echo '       <td colspan="2" width="520"><div

class="noprint"><p align="center"><font face="Verdana" size="2">' .

"\n";
     echo '         <input type=submit value="Click Here

to Submit" name=submit tabindex="9">' . "\n";
     echo '       </font></p></div></td>' . "\n";
     echo '      </tr>' . "\n";
     echo '            </form>' . "\n";
     echo '     </table>' . "\n";
    }
?>
<br>
&nbsp;

// Brian Modified from this point down

<div align="left">
<table border="0" width="100%">
    <tr>
        <td><font face="Verdana" size="2">&nbsp;Item Number:

&nbsp;<?php $name = strip_tags($_GET['photoname']); ?><?php echo $name

?>
        </font> </td>
        <td><font face="Verdana" size="2">&nbsp; Description:

&nbsp;<?php $desc = strip_tags($_GET['description']); ?><?php echo

$desc ?></font></td>
        <td><font face="Verdana" size="2">&nbsp; Quantity:

</font> <input type="text" name="quantity" size="4">
        </td>
    </tr>
</table>
</div>
  1. <?php
  2. /**
  3. * @author Travis Person
  4. * @copyright 2007
  5. * Developed with PHP Designer 2007 
  6. *        http://mpsoftware.de
  7. *
  8. */
  9.     // Start a session.
  10.     session_start();
  11.     // Grab information from URL.
  12.     $name = strip_tags($_GET['photoname']); 
  13.     $desc = strip_tags($_GET['description']);
  14.     // If this is the first time viewing page make the 
  15. cart session var an array.
  16.     if (!$_SESSION['cart'])
  17.     {
  18.      $_SESSION['cart'] = array();
  19.     }
  20.     
  21.     // Add items to the item array.
  22.     $arrayITEM['NAME'] = $name;
  23.     $arrayITEM['DESC'] = $desc;
  24.     // Transfer array.
  25.     $arrayCART = $_SESSION['cart'];
  26.     
  27.             
  28.     // If they have submited a form they arnt going to need to add
  29. another item so we wont.
  30.     if (!$_POST['submit'])
  31.     {
  32.      // Put informtion into the cart.
  33.      array_push($arrayCART, $arrayITEM);
  34.     
  35.     
  36.      // Store the cart back in the session.
  37.      $_SESSION['cart'] = $arrayCART;
  38.     }
  39.     
  40.     // DISPLAYS BEFORE ORDER INFORMATION //
  41.     echo '<table border=\'0\'>' . "\n";
  42.     // // // // // // // // // // // // //
  43.     
  44.     foreach ($arrayCART as $id => $name)
  45.     {
  46.      // DISPLAYS INBETWEEN ITEMS BEFORE //
  47.     
  48.      // // // // // // // // // // // // //
  49.      foreach ($arrayCART[$id] as $key => $info)
  50.      {
  51.       //  DISPLAYS PER EACH ITEM FIELD  //
  52.       echo "\t" . '<tr>' . "\n";
  53.       echo "\t\t" . '<td>' . $key . ':' . $info . '</td>' . "\n";
  54.       echo "\t" . '</tr>' . "\n";
  55.       // // // // // // // // // // // // //
  56.     
  57.      }
  58.      // DISPLAYS INBETWEEN ITEMS AFTER //
  59.      echo "\t" . '<tr>' . "\n";
  60.      echo "\t\t" . '<td>&nbsp;</td>' . "\n";
  61.      echo "\t" . '</tr>' . "\n";
  62.      // // // // // // // // // // // // //
  63.     }
  64.     // DISPLAYS AFTER ORDER INFORMATION //
  65.     echo '</table>' . "\n";
  66.     // // // // // // // // // // // // //
  67.     
  68.     echo '<br>' . "\n";
  69.     echo '<br>' . "\n";
  70.     echo '<br>' . "\n";
  71.     
  72.     // If the form is submited we want to display the information
  73. they entered.
  74.     if ($_POST['submit'])
  75.     {
  76.     
  77.      // Process submition.
  78.      $f_name = $_POST['f_name'];
  79.      $f_addr = $_POST['f_addr'];
  80.      $f_city = $_POST['f_city'];
  81.      $f_state = $_POST['f_state'];
  82.      $f_zipcode = $_POST['f_zipcode'];
  83.      $f_phone = $_POST['f_phone'];
  84.      $f_email = $_POST['f_email'];
  85.     
  86.      // Put submited information into a varible to display (You
  87. dont really need to store if but its standard for me).
  88.      $message .= 'Name:' . $f_name . "<br>\n";
  89.      $message .= 'Address:' . $f_addr . "<br>\n";
  90.      $message .= 'City:' . $f_city . "<br>\n";
  91.      $message .= 'State:' . $f_state . "<br>\n";
  92.      $message .= 'Zip:' . $f_zipcode . "<br>\n";
  93.      $message .= 'Phone:' . $f_phone . "<br>\n";
  94.      $message .= 'Email:' . $f_email . "<br>\n";
  95.     
  96.      // Display the message.
  97.      echo $message;
  98.     
  99.     }
  100.     else
  101.     {
  102.      // If they have not submited there order then we want to give
  103. them the option too.
  104.     
  105.     
  106.      // THIS IS JUST A BUNCH OF HTML CODE DISPLAYED LINE BY LINE
  107. //
  108.      // THIS IS JUST A BUNCH OF HTML CODE DISPLAYED LINE BY LINE
  109. //
  110.      // THIS IS JUST A BUNCH OF HTML CODE DISPLAYED LINE BY LINE
  111. //
  112.     
  113.      // There is nothing really crazy about this code below, just
  114. standard html.
  115.      echo '     <h2>Continue Checkout</h2>' . "\n";
  116.      echo '     <table border="0" cellpadding="3"
  117. cellspacing="0" width="500" bgcolor="#EEEFEE" style="border: D6DFE8
  118. solid 1px">' . "\n";
  119.      echo '      <tr valign="top">' . "\n";
  120.      echo '       <td></td><td><div class="noprint"><p
  121. align="left"><font face="Verdana" size="2" color="FF0000"><b>Info
  122. Text</b></font></div></td>' . "\n";
  123.      echo '      </tr>' . "\n";
  124.      echo '            <form method="post"
  125. name="myform">' . "\n";
  126.      echo '            <tr>' . "\n";
  127.      echo '       <td width="100" height="31"><font
  128. face="Verdana" size="2">&nbsp;&nbsp; Name:</font></td>' . "\n";
  129.      echo '       <td width="251" height="31"><font
  130. face="Verdana" size="2">' . "\n";
  131.      echo '        <input maxlength=40 size=40
  132. name="f_name" tabindex="1" value="">' . "\n";
  133.      echo '       </font></td>' . "\n";
  134.      echo '      </tr>' . "\n";
  135.      echo '      <tr>' . "\n";
  136.      echo '       <td width="100" height="31"><font
  137. face="Verdana" size="2">&nbsp;&nbsp; Address:</font></td>' . "\n";
  138.      echo '       <td width="251" height="31"><font
  139. face="Verdana" size="2">' . "\n";
  140.      echo '             <input maxlength=40 size=40
  141. name="f_addr" tabindex="2"> ' . "\n";
  142.      echo '             </font></td>' . "\n";
  143.      echo '      </tr>' . "\n";
  144.      echo '      <tr>' . "\n";
  145.      echo '       <td width="100" height="31"><font
  146. face="Verdana" size="2"> &nbsp;&nbsp;&nbsp;City:</font></td>' . "\n";
  147.      echo '       <td width="251" height="31"><font
  148. face="Verdana" size="2">' . "\n";
  149.      echo '        <input maxlength=20 size=20
  150. name="f_city" tabindex="3"></font></td>' . "\n";
  151.      echo '      </tr>' . "\n";
  152.      echo '      <tr>' . "\n";
  153.      echo '       <td width="100" height="31"><font
  154. face="Verdana" size="2">&nbsp;&nbsp; State:</font></td>' . "\n";
  155.      echo '       <td width="251" height="31"><font
  156. face="Verdana" size="2">' . "\n";
  157.      echo '             <select name="f_state"
  158. tabindex="4">' . "\n";
  159.      echo '                 <option
  160. value="0">State...</option>' . "\n";
  161.      echo '                 <option
  162. value="Na">Other / Not USA</option>' . "\n";
  163.      echo '                 <option value="AL"
  164. >Alabama</option>' . "\n";
  165.      echo '                 <option value="AK"
  166. >Alaska</option>' . "\n";
  167.      echo '                 <option value="AZ"
  168. >Arizona</option>' . "\n";
  169.      echo '                 <option value="AR"
  170. >Arkansas</option>' . "\n";
  171.      echo '                 <option value="CA"
  172. >California</option>' . "\n";
  173.      echo '                 <option value="CO"
  174. >Colorado</option>' . "\n";
  175.      echo '                 <option value="CT"
  176. >Connecticut</option>' . "\n";
  177.      echo '                 <option value="DE"
  178. >Delaware</option>' . "\n";
  179.      echo '                 <option value="DC"
  180. >District of Columbia</option>' . "\n";
  181.      echo '                 <option value="FL"
  182. >Florida</option>' . "\n";
  183.      echo '                 <option value="GA"
  184. >Georgia</option>' . "\n";
  185.      echo '                 <option value="HI"
  186. >Hawaii</option>' . "\n";
  187.      echo '                 <option value="ID"
  188. >Idaho</option>' . "\n";
  189.      echo '                 <option value="IL"
  190. >Illinois</option>' . "\n";
  191.      echo '                 <option value="IN"
  192. >Indiana</option>' . "\n";
  193.      echo '                 <option value="IO"
  194. >Iowa</option>' . "\n";
  195.      echo '                 <option value="KS"
  196. >Kansas</option>' . "\n";
  197.      echo '                 <option value="KY"
  198. >Kentucky</option>' . "\n";
  199.      echo '                 <option value="LA"
  200. >Louisiana</option>' . "\n";
  201.      echo '                 <option value="ME"
  202. >Maine</option>' . "\n";
  203.      echo '                 <option value="MD"
  204. >Maryland</option>' . "\n";
  205.      echo '                 <option value="MA"
  206. >Massachusetts</option>' . "\n";
  207.      echo '                 <option value="MI"
  208. >Michigan</option>' . "\n";
  209.      echo '                 <option value="MN"
  210. >Minnesota</option>' . "\n";
  211.      echo '                 <option value="MS"
  212. >Mississippi</option>' . "\n";
  213.      echo '                 <option value="MO"
  214. >Missouri</option>' . "\n";
  215.      echo '                 <option value="MT"
  216. >Montana</option>' . "\n";
  217.      echo '                 <option value="NE"
  218. >Nebraska</option>' . "\n";
  219.      echo '                 <option value="NV"
  220. >Nevada</option>' . "\n";
  221.      echo '                 <option value="NH"
  222. >New Hampshire</option>' . "\n";
  223.      echo '                 <option value="NJ"
  224. >New Jersey</option>' . "\n";
  225.      echo '                 <option value="NM"
  226. >New Mexico</option>' . "\n";
  227.      echo '                 <option value="NY"
  228. >New York</option>' . "\n";
  229.      echo '                 <option value="NC"
  230. >North Carolina</option>' . "\n";
  231.      echo '                 <option value="ND"
  232. >North Dakota</option>' . "\n";
  233.      echo '                 <option value="OH"
  234. >Ohio</option>' . "\n";
  235.      echo '                 <option value="OK"
  236. >Oklahoma</option>' . "\n";
  237.      echo '                 <option value="OR"
  238. >Oregon</option>' . "\n";
  239.      echo '                 <option value="PA"
  240. >Pennsylvania</option>' . "\n";
  241.      echo '                 <option value="RI"
  242. >Rhode Island</option>' . "\n";
  243.      echo '                 <option value="SC"
  244. >South Carolina</option>' . "\n";
  245.      echo '                 <option value="SD"
  246. >South Dakota</option>' . "\n";
  247.      echo '                 <option value="TN"
  248. >Tennessee</option>' . "\n";
  249.      echo '                 <option value="TX"
  250. >Texas</option>' . "\n";
  251.      echo '                 <option value="UT"
  252. >Utah</option>' . "\n";
  253.      echo '                 <option value="VT"
  254. >Vermont</option>' . "\n";
  255.      echo '                 <option value="VA"
  256. >Virginia</option>' . "\n";
  257.      echo '                 <option value="WA"
  258. >Washington</option>' . "\n";
  259.      echo '                 <option value="WV"
  260. >West Virginia</option>' . "\n";
  261.      echo '                 <option value="WI"
  262. >Wisconsin</option>' . "\n";
  263.      echo '                 <option value="WY"
  264. >Wyoming</option>' . "\n";
  265.      echo '                </select></font></td>'
  266. . "\n";
  267.      echo '      </tr>' . "\n";
  268.      echo '      <tr>' . "\n";
  269.      echo '       <td width="100" height="31"><font
  270. face="Verdana" size="2">&nbsp;&nbsp; Zip:</font></td>' . "\n";
  271.      echo '       <td width="251" height="31"><font
  272. face="Verdana" size="2">' . "\n";
  273.      echo '        <input maxlength=10 size=10
  274. name="f_zipcode" tabindex="5">' . "\n";
  275.      echo '       </font></td>' . "\n";
  276.      echo '      </tr>' . "\n";
  277.      echo '             <tr>' . "\n";
  278.      echo '        <td width="100" height="31"><font
  279. face="Verdana" size="2">&nbsp;&nbsp; Phone#:</font></td>' . "\n";
  280.      echo '       <td width="243" height="31"><font
  281. face="Verdana" size="2">' . "\n";
  282.      echo '        <input maxlength=16 size=16
  283. name="f_phone" tabindex="7">' . "\n";
  284.      echo '       </font></td>' . "\n";
  285.      echo '      </tr>' . "\n";
  286.      echo '      <tr>' . "\n";
  287.      echo '       <td width="100" height="31"><font
  288. face="Verdana" size="2">&nbsp;&nbsp; E-mail:</font></td>' . "\n";
  289.      echo '       <td width="253" height="31"><font
  290. face="Verdana" size="2">' . "\n";
  291.      echo '        <input maxlength=40 size=40
  292. name="f_email" tabindex="8" value="">' . "\n";
  293.      echo '       </font></td>' . "\n";
  294.      echo '      </tr>' . "\n";
  295.      echo '      <tr>' . "\n";
  296.      echo '       <td colspan="2" width="520"><div
  297. class="noprint"><p align="center"><font face="Verdana" size="2">' .
  298. "\n";
  299.      echo '         <input type=submit value="Click Here
  300. to Submit" name=submit tabindex="9">' . "\n";
  301.      echo '       </font></p></div></td>' . "\n";
  302.      echo '      </tr>' . "\n";
  303.      echo '            </form>' . "\n";
  304.      echo '     </table>' . "\n";
  305.     }
  306. ?>
  307. <br>
  308. &nbsp;
  309. // Brian Modified from this point down
  310. <div align="left">
  311. <table border="0" width="100%">
  312.     <tr>
  313.         <td><font face="Verdana" size="2">&nbsp;Item Number:
  314. &nbsp;<?php $name = strip_tags($_GET['photoname']); ?><?php echo $name
  315. ?>
  316.         </font> </td>
  317.         <td><font face="Verdana" size="2">&nbsp; Description:
  318. &nbsp;<?php $desc = strip_tags($_GET['description']); ?><?php echo
  319. $desc ?></font></td>
  320.         <td><font face="Verdana" size="2">&nbsp; Quantity:
  321. </font> <input type="text" name="quantity" size="4">
  322.         </td>
  323.     </tr>
  324. </table>
  325. </div>


Also, I changed this part:

Code: [ Select ]
$name = strip_tags($_GET['photoname']); 
$desc = strip_tags($_GET['description']);
  1. $name = strip_tags($_GET['photoname']); 
  2. $desc = strip_tags($_GET['description']);


I added the strip_tags part in front of the ($GET statement. I was told by a member of another forum to add that. But they haven't replied since.

Like I say, the end result would be to display what has been clicked in the gallery to be displayed on the checkout page like a shopping cart in the sense that when you get to the checkout.php page, you can hit back and the page contents would remain, and new contents would be added when more items were clicked on.

I really appreciate your help in advance.
  • Brian Jester
  • Beginner
  • Beginner
  • Brian Jester
  • Posts: 61
  • Loc: Bayonne, New Jersey USA

Post 3+ Months Ago

I appreciate anyone having some time to fix this checkout page for me. I've tried and tried, and all I wanted to do was make a checkout page for this program so I could accept mail order payments...Seems a bit too steep for me to accomplish on my own.

Thanks alot to SpooF for his help along the way with this code...And if your busy atm or just don't feel like working on it atm, (I don't blame you)...Don't worry about it, but I thought I'd post this for anyone who's wants to try it.

Thanks again SpooF.

Post Information

  • Total Posts in this topic: 23 posts
  • Users browsing this forum: No registered users and 120 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.