Welcome visitor
* Login
* Register
It is currently May 22nd, 2019, 2:46 am
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Server Side » PHP



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  how to use POST
PostPosted: July 15th, 2009, 8:43 pm 

Posts: 27
When using a form with the POST method, how can i retreive the form values?
When using GET everything is on the URL, but where is the info that POST sends?


Top
 Profile  
 
  Re: how to use POST
PostPosted: July 15th, 2009, 8:56 pm 
User avatar

Posts: 86
Its stored on an array called $_POST['inputName'] and the index is the name of each form's input.

From the html form
<input name="input1">


ThePHP method to use POST
<?php
echo $_POST['input1'];
?>


Another way to do it is break the array into separate variables
<?php
extract $_POST;
//and then just call the variable you need
echo $input1;
$total= $input2+$input3;
?>


Hope this helps.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Server Side » PHP


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

Search for:
Jump to:  
cron