i was wondering if i could do a process order of a customer ... i have very little idea on what are all the things involved in this side .. of the customer order page
And you have to learn them before you'll be able to do them. You seem to think that all it takes to develop a site is for someone to give you a few instructions, and you can do the rest. It's not. You can't write code until you learn to write code, and if you're really good that can take 6 months or more. (A CS degree, which is 'how to write code' takes 4 years, and that's the basics.)
You design the hardware that can do it, and I'll develop the website that they can use to order and pay for it.
lol i just figured out something a bit more simpler i need a connection betweem order icecream page and fill in shipping address link
You need a connection between "I don't know anything about programming" and "I want to write code". It's called "studying".
this is a second version of the same concept ... the script sends an email .. to the administrator ... but .. donno who is it from ? how can i make it look like its from a particular user ? As a website becomes more sophisticated, so must the code that backs it. When you get to a stage where your website need to pass along user data from one page to another, it might be time to start thinking about using PHP sessions. A normal HTML website will not pass data from one page to another. In other words, all information is forgotten when a new page is loaded. This makes it quite a problem for tasks like a shopping cart, which requires data(the user's selected product) to be remembered from one page to the next.
Bty learning programming and the SMTP protocol. Unless you have the experience to write the "more sophisticated" code right from the start. Or you start the site using PHP, so that when you need it you just add some code instead of having to rewrite the entire site. A shopping cart also needs a database and the ability to query a credit card provider, which means server-side code right from the beginning. But copying and pasting something you don't understand from a site somewhere isn't going to teach you wnat you need to create your own site. Only studying will. (You have 1 mouth, 2 eyes and 2 ears. That seems to be a hint to listen and look twice as much as you speak.)
<form action="" name="priceCalc" method="POST"> I Am Paying For : <select name="item" onchange="price();"> <option value="15">item 1 - $15.00</option> <option value="35">item 2 - $35.00</option> <option value="35">item 3 - $35.00</option> <option value="29.90">item 4 - $29.90</option> <option value="29.90">item 5 - $29.90</option> <option value="26.90">item 6 - $26.90</option> <option value="32.90">item 7 - $32.90</option> <option value="59.90">item 8 - $59.90</option> <option value="59.90">item 9 - $59.90</option> </select> <br /> <br /> Quantity : <select name="quantity" onchange="price();"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> </select> <br /> <br /> Please deposit the freight free full total of <br /> <span style="color:red; font-size:18px;" id="prices">$</span> into our account : <br /> <input type="submit" name="submit" value="BUY NOW!" /> </form>​ /* JavaScript */ function price() { var qty = document.priceCalc.quantity; var itm = document.priceCalc.product; var price = parseInt(qty.value) * parseInt(itm.value); document.getElementById("prices").innerHTML = '$' + price; }​ <?php $item = $_POST["item"]; $quantity = $_POST["quantity"]; $subject = "Website Sale!"; $emailto = "myemail@test.com"; // prepare email body text $body .= ""; $body .= "To Sales Team"; $body .= "\n"; $body .= "\n"; $body .= "I have purchased "; $body .= $quantity; $body .= "x "; $body .= $item; $body .= "\n"; $body .= "\n"; $body .= "Please look out for my payment in the account over the next few days."; // send email $success = mail($emailto, $subject, $body"); // redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=../order_sent.php\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=../index.php\">"; } ?>​
the page is really like .. the user logins ... gets to the order product page .. its a session protected page .. where only a login user can see the page ... after a login user sees the page .. he gets a form to order the product <?php session_start(); $_SESSION['username']; ?> form $item $quantity script $item = $_POST { "item " ]; $quantity = $_post { "quantity" ] ; how do i include a $session variable too in the form ...? so which one is the session variable name .. which one is the variable .. how do i take that variable and email it through that form ? input name , input .................... ?
i looked at the form again ... <?php $quantity = $_GET["quantity"]; $item = $_GET["item"]; $subject = "Website Sale!"; $emailto = "myemail@test.com"; i was wondering if i could add this too $session = $_GET["session"];
<form action="the name of the file you're sending the data to" ... All the data in named elements gets sent to that file.