Board index   FAQ   Search  
Register  Login
Board index PHP PHP General

Simple php 'POST' usage

General discussions related to php

Moderators: macek, egami, gesf

Simple php 'POST' usage

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

Code: Select all
<?php
echo '<h1 align="center"> Bharadwaj Cartz.com</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
<?php
$item = $_POST['item'];
$quantity = $_POST['quantity'];
echo 'Thank u! ' . $item . ' quantity ' . $quantity;
?>
User avatar
Bharadwaj
New php-forum User
New php-forum User
 
Posts: 1
Joined: Thu Jan 31, 2013 4:31 pm

Re: Simple php 'POST' usage

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

is there a question?
seandisanti
php-forum Fan User
php-forum Fan User
 
Posts: 838
Joined: Mon Oct 01, 2012 12:32 pm


Return to PHP General

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.