Jump to content

how to resend data from action to form page?


prakki79

Recommended Posts

Hi,

 

I am newbie to PHP. If any one explain me with a simple example, it would be really great.

 

I have a form page "queue_info.php". After user hits SUBMIT, this page will redirect to an action page "queue_action.php".

from form page data are passed using "$quests=$_POST['quests'];" to this action page.

Now i need to resend this same data back to the form page "queue_info.php" from action page. How to do this? Appreciate your inputs on this.

 

thanks,

prakash

 

You could do three things. One, send the variables back by appending them to the URL of queue_info.php. For example queue_info.php?id=5&from=user, then inside queue_info.php, you access those variables using $_GET, exactly as you've used $_POST. This means that the user will see all of the variables and their content, which may not be wanted.

 

You could use javascript to submit another form on the queue_action.php page. Submit it to queue_info.php and access using $_POST again.

 

Or the third is using session variables, which will then be accessible on any page in your website..

 

Hope that helps a little..

 

Denno

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.