SoulEyes Photography
*SoulEyes Photography>>>Wedding Photography

How can I finish this PHP/HTML order form?


I have started an order form for my wedding photography business: http://www.smilelikeumeanit.com/wed/stor...

I want the form to go to another page that summarizes the number of each print size that someone is trying to order. So, I'll need to add up each category. I've never done math with PHP before is it even possible?

The other thing I've never done is display the information back to the user and ask them to confirm before emailing it to myself.

Can you please give me either links to a tutorial that will help, or sample code that will do what I'm looking for?

To summarize everything just make a php code that echo the POST data. Make data out put in a table to make it neat.

yes math in php is easy

ex:

$product1 = $_POST['picture1price'];
$product2 = $_POST['picture2price'];
$sub_total = $product1 + $product2;
echo $subtotal;

This is just an SIMPLE example of the math part;

w3schools.com on the left under the server scripting. click learn PHP. Very good site for php!

There are also many open source shopping scripts out there also.

Good Luck

Can you store the temporary values in an array, something like 3 of item6, 4 of item 13, ...?

Then multiply out each line item, subtotal, display the value.

Just use normal algebraic precedence, controlled with ()s.

If you get stuck, google "open source shopping cart".

It sounds like a nice idea, but that is going to be a big pain to keep that system maintained. It doesn't sound like your PHP is quite there yet, but what I would do is make it so you can copy all the images into a particular directory and they automatically show up on the order page. Then the cart would be handled using session variables. On the order page it would list everything that they have ordered and let them pay through Paypal. Then you get the order and make the prints.

I don't really have any links I could give you as something like this would have to be custom made. The learning PHP links are good, but it may take you a long time to get to a level to get a completed project. Contact me if you would like more help.

Yes it is possible, but you need to do some crazy 'PHP magic'! :)

This is how I would go about doing it... for starters, you need to make use of arrays in your input field. Instead of saying

input type="text" id="foursix01" name="foursix01" value="1"
input type="text" id="fiveeight01" name="fiveeight01" value="0"

you can change it to

input type="text" id="foursix01" name="foursix[]" value="1"
input type="text" id="fiveeight01" name="fiveeight[]" value="0"

See the source list below...

What you are doing is changing the name attribute into an array so that you can pick it up after you submit the form as $_POST[foursix], which will return you an array. something like this...

$foursixArray = $_POST['foursix'];
foreach ($foursixArray as $foursixCount) {
$foursixTotal += $foursixCount
}

then you should have a total, which you can then multiple with the cost of 4x6 which is $2,

$foursixPrice = $foursixTotal * 2;

I'm just giving you the general direction to go. Of course you need to do it for each type of photo print you provide. It might be easier to start using multi-dimensional arrays etc.

contact me at diagnostix@email.com if you need further help.

Tags
Photography Courses Photo Gallery Photo Essays Art Gallery Wedding Photography Stock Photography Product Photography Jewelry Photography Fashion Photography Corporate Photography
Related information
  • Wedding Reception?

    Gorgeous place to have your reception. Make sure that you have enough money allocated for the rehearsal dinner and gifts for your wedding party. I would spend what is left on the reception.

    ...
  • Wedding Photograhy Poses?

    This is the book I picked up when I was asked to photograph the wedding of friends of a friend: ...

  • Should i get my associates?

    In fields like you're talking about, creative experience means much more than a degree usually. My advice would be to pursue graphic design in school (as that would be the one most likely to i...

  • Sort of a rude question, but if you are willing to answer that would be great!?

    We spent more than that, but it definitely could have been done in less. One thing you definitely don't need is too many decorations for the church and the reception hall. My mom went a little...

  • Am I forgetting anything in our budget?

    What about the rehersal ~ anything planned/cost involved? Will there be corsages for any of the wedding party/ parents of the couple? Beverages for reception Music for the reception? Whatever ...

  • For all those who are married or recently engaged... help on weddin plannin!! pleaseeee =D?

    I think that www.theknot.com has the best information. It really depends on how much you have to spend. You can have a small wedding or a grand, mega expensive wedding. One of my friends was tr...

  • What to do about a fraudulent business?

    Due to the amount this would be a small claims court case not something for a lawyer. If you paid cash or check go down to the courthouse and file a small claims case ASAP. If you paid using your...

  • The wedding is still on!!! Need help planning...?

    Here is the list I used for planning my wedding. I didnt do all the stuff on here, but you can weed out what you don't want Wedding Supplies Shopping List Sort By Date | Sort By Categor...

  •  

    Photography Categories--Copyright/IP Policy--Contact Webmaster