We help IT Professionals succeed at work.
Get Started

How to get form data after php redirect

Jonathan Greenberg
Last Modified: 2012-05-11
I have a php page in a web app I'm developing within Joomla that contains a form. The form action points somewhere (I'm not sure to which actual page), then it redirects to my new page. On my new page, I need access to the form values, but they are not accessible via $_POST. I assume this is because we're arriving at my new page due to a redirect rather than the form action.

I can edit the form and the page it's on pretty much however I like, but because this is all happening within a Joomla extension, I need to avoid getting in the way of the form action. The form action looks like this:

action="<?php echo JRoute::_( 'index.php?option=com_ajaxregistration' ); ?>" method="post"

I suppose I could add to it, but I'm not sure exactly how I would do that or how that might benefit me.

I can't figure out how to access the form data on my new page. One method that occurs is to save the values to a session, but I don't know how to do this from the same page that the form is on. Maybe by adding some javascript to the submit button? Or to the textfield onblur events? Or is it time for me to learn AJAX?

How can I make this form data accessible on my new page? Really need help with this one. Thanks.
Watch Question
PHP Development Team Leader
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE