Simple php 'POST' usage

General discussions related to php

Moderators: macek, egami, gesf

User avatar
New php-forum User
New php-forum User
Posts: 1
Joined: Thu Jan 31, 2013 4:31 pm

Simple php 'POST' usage

Postby Bharadwaj » Tue Feb 05, 2013 8:38 am

Code: Select all

echo '<h1 align="center"> Bharadwaj</h1>';
echo '<form action="order.php" method="post">';
echo '<select name="item">';
echo '<option> windows vista </option>';
echo '<option> windows7 </option>';
echo '<option> windows8 </option>';
echo '</select>';
echo ' Quantity : <input type="text" name="quantity" />';
echo '<input type="submit" value="Order Now!" />';
echo '</form>';

Code: Select all

$item = $_POST['item'];
$quantity = $_POST['quantity'];
echo 'Thank u! ' . $item . ' quantity ' . $quantity;

php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Re: Simple php 'POST' usage

Postby seandisanti » Thu Feb 07, 2013 12:29 pm

is there a question?

Return to “PHP General”

Who is online

Users browsing this forum: No registered users and 1 guest