Photo-Graffix -> Checkout Page.
- Brian Jester
- Beginner


- Joined: Jan 06, 2006
- Posts: 61
- Loc: Bayonne, New Jersey USA
- Status: Offline
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
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:
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.
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.
Now that you know that, a basic checkout page may look like this:
Ok..Now for the 'tough' part it's making me
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.
I Thank all who help with this project!
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"> Item Name: <?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"> 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"> 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"> 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"> 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"> 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"> 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>
<p align="center"><font face="Verdana">Checkout Page</font></p>
<table border="0">
<tr>
<td><font face="Verdana" size="2"> Item Name: <?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"> 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"> 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"> 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"> 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"> 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"> 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>
- <!-- CONTENT STARTS -->
- <p align="center"><font face="Verdana">Checkout Page</font></p>
- <table border="0">
- <tr>
- <td><font face="Verdana" size="2"> Item Name: <?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"> 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"> 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"> 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"> 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"> 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"> 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>
Ok..Now for the 'tough' part it's making me
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


- Joined: 25 Feb 2008
- Posts: ?
- Loc: Ozzuland
- Status: Online
June 23rd, 2007, 9:17 am
- SpooF
- ٩๏̯͡๏۶


- Joined: May 22, 2004
- Posts: 3415
- Loc: Richland, WA
- Status: Offline
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.
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.
#define NULL (::rand() % 2)
- Brian Jester
- Beginner


- Joined: Jan 06, 2006
- Posts: 61
- Loc: Bayonne, New Jersey USA
- Status: Offline
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.
Thanks.
- SpooF
- ٩๏̯͡๏۶


- Joined: May 22, 2004
- Posts: 3415
- Loc: Richland, WA
- Status: Offline
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
/**
* @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> </td>'."\n";
echo "\t" . '</tr>'."\n";
}
echo '</table>'."\n";
?>
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> </td>'."\n";
echo "\t" . '</tr>'."\n";
}
echo '</table>'."\n";
?>
- <?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> </td>'."\n";
- echo "\t" . '</tr>'."\n";
- }
- echo '</table>'."\n";
- ?>
#define NULL (::rand() % 2)
- Brian Jester
- Beginner


- Joined: Jan 06, 2006
- Posts: 61
- Loc: Bayonne, New Jersey USA
- Status: Offline
- Brian Jester
- Beginner


- Joined: Jan 06, 2006
- Posts: 61
- Loc: Bayonne, New Jersey USA
- Status: Offline
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:
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.
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


- Joined: Jan 06, 2006
- Posts: 61
- Loc: Bayonne, New Jersey USA
- Status: Offline
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


- Joined: Jan 06, 2006
- Posts: 61
- Loc: Bayonne, New Jersey USA
- Status: Offline
Could you do something like that?
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
Code: [ Select ]
http://www.stocksignalpro.com/SSP279order_mail.htm
Thanks alot in advance!
-Brian
- SpooF
- ٩๏̯͡๏۶


- Joined: May 22, 2004
- Posts: 3415
- Loc: Richland, WA
- Status: Offline
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.
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.
#define NULL (::rand() % 2)
- Brian Jester
- Beginner


- Joined: Jan 06, 2006
- Posts: 61
- Loc: Bayonne, New Jersey USA
- Status: Offline
- SpooF
- ٩๏̯͡๏۶


- Joined: May 22, 2004
- Posts: 3415
- Loc: Richland, WA
- Status: Offline
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> </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"> 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"> 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"> 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"> 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"> 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"> 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"> 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>';
}
?>
/**
* @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> </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"> 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"> 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"> 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"> 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"> 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"> 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"> 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>';
}
?>
- <?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> </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"> 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"> 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"> 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"> 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"> 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"> 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"> 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>';
- }
- ?>
#define NULL (::rand() % 2)
- Brian Jester
- Beginner


- Joined: Jan 06, 2006
- Posts: 61
- Loc: Bayonne, New Jersey USA
- Status: Offline
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
- ٩๏̯͡๏۶


- Joined: May 22, 2004
- Posts: 3415
- Loc: Richland, WA
- Status: Offline
Here it is:
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.
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> </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"> 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"> 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"> 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"> 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"> 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"> 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"> 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";
}
?>
/**
* @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> </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"> 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"> 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"> 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"> 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"> 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"> 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"> 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";
}
?>
- <?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> </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"> 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"> 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"> 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"> 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"> 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"> 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"> 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";
- }
- ?>
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.
#define NULL (::rand() % 2)
- Brian Jester
- Beginner


- Joined: Jan 06, 2006
- Posts: 61
- Loc: Bayonne, New Jersey USA
- Status: Offline
- SB
- Moderator


- Joined: Nov 16, 2004
- Posts: 8677
- Loc: Aberdeen, Scotland
- Status: Offline
- Anonymous
- Bot


- Joined: 25 Feb 2008
- Posts: ?
- Loc: Ozzuland
- Status: Online
June 25th, 2007, 5:42 pm
1, 2
To Reply to this topic you need to LOGIN or REGISTER. It is free.
Post Information
- Total Posts in this topic: 23 posts
- Users browsing this forum: No registered users and 116 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
