Log in

View Full Version : Getting back to HTML form from PHP script



JohnWB
01-13-2010, 04:45 PM
Hi Everyone,

I am a complete beginner so hope question not too dumb!

Currently using EasyPHP as my development tool which provides you with a server located on your laptop.

My colleage has written some HTML forms for me with boxes and radio buttons for user input.

I have managed to write PHP scripts which pick up the user input for validation. All logic appears OK. However, instead of my echo statements appearing on the HTML form (to show input error etc for retry), they are showing on a different page (my PHP script file page). How do I get back to the HTML page? Hope all this makes sense. JB

bluewalrus
01-14-2010, 07:03 AM
Post your code, not sure...

djr33
01-14-2010, 08:20 AM
There are only two ways to get back:
1. You could do the processing on the second page and then use a redirect after.
2. You can merge the two scripts into one, which is the standard way to do things like this. (As a basic approach, the php would be at the top and html below.)

JohnWB
01-14-2010, 12:23 PM
Thank you for your reply. Will try merging PHP/HTML in the way suggested.