Digital Point Forums
Wire Transfer

Go Back   Digital Point Forums > Design & Development > Programming > PHP
Google Analytics
Log In to view
your analytics

Reply
 
Thread Tools
  #1  
Old Feb 29th 2008, 3:19 am
gordi555's Avatar
gordi555 gordi555 is offline
Hand of A'dal
 
Join Date: Feb 2006
Posts: 417
gordi555 is on a distinguished road
$_POST variables help please

I have a page which get's it values from a POST method.

Basically...

I want to allow people entering discount codes and then repost all the post varibles to the current page again so I can process any codes that where added.

Does anyone know a quick solution to this please?

Thanks for all your help,

Gordon
Reply With Quote
  #2  
Old Feb 29th 2008, 3:29 am
AsHinE AsHinE is offline
Champion of the Naaru
 
Join Date: Jul 2007
Posts: 178
AsHinE is on a distinguished road
Maybe i didn't understand the question properly, but you can put those discount codes in $_SESSION variable or in a cookie.
Reply With Quote
  #3  
Old Feb 29th 2008, 4:07 am
gordi555's Avatar
gordi555 gordi555 is offline
Hand of A'dal
 
Join Date: Feb 2006
Posts: 417
gordi555 is on a distinguished road
Yes I'm storing discount in a session but I was wondering how can I easily re-post all the $_POST variables without to the page again?
Reply With Quote
  #4  
Old Feb 29th 2008, 5:39 am
bartolay13's Avatar
bartolay13 bartolay13 is offline
Hand of A'dal
 
Join Date: Nov 2007
Location: Philippines
Posts: 441
bartolay13 is on a distinguished road
you can store it into cookies,session, global and or to the db.

or send it to the same page..

<?php
if(isset($_POST['yourform']))
{
echo "<form name="form2">";
...........
echo "</form>";
}

<form name="yourform">
............
</form>
?>
__________________
Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning.
Reply With Quote
  #5  
Old Feb 29th 2008, 6:07 am
AsHinE AsHinE is offline
Champion of the Naaru
 
Join Date: Jul 2007
Posts: 178
AsHinE is on a distinguished road
Quote:
Originally Posted by gordi555 View Post
Yes I'm storing discount in a session but I was wondering how can I easily re-post all the $_POST variables without to the page again?
If you need to repost variables I suggest to make them hidden fields on the form. <input type="hidden"> and so on.
Reply With Quote
  #6  
Old Feb 29th 2008, 6:29 am
quicksolutions quicksolutions is offline
Peon
 
Join Date: Feb 2008
Location: Lahore,Pakistan
Posts: 17
quicksolutions is on a distinguished road
As i understood your question: To get all posted data you can use foreach method like this


foreach($_POST as $v){
echo $v;
}

Last edited by quicksolutions; Feb 29th 2008 at 6:39 am.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
$_POST[op] lektrikpuke PHP 7 Oct 22nd 2007 12:36 pm
unsetting $_POST variables even if "Refreshed" jasonjohnson3424 PHP 7 May 18th 2007 8:56 am
How to use $_post with js?? 123GoToAndPlay JavaScript 3 May 12th 2007 10:12 am
$_POST method help Vizuke PHP 5 Sep 4th 2006 11:05 am
$_POST problem mnemtsas PHP 6 Oct 24th 2005 1:59 pm


All times are GMT -8. The time now is 9:52 am.