Results 1 to 4 of 4

Thread: Getting back to HTML form from PHP script

  1. #1
    Join Date
    Jan 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Getting back to HTML form from PHP script

    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

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Post your code, not sure...
    Corrections to my coding/thoughts welcome.

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.)
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    Jan 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for your reply. Will try merging PHP/HTML in the way suggested.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •