Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

[php] forms and redirection

Options
  • 03-01-2003 2:48pm
    #1
    Closed Accounts Posts: 1,325 ✭✭✭


    Well after sorting out the redirection. using the refresh meta tag as dahamsta suggested (Thanks :) worked like a charm).

    ok so i have a form.
    luser forgets to enter something vital like ther name, for instance.

    i want to refresh that page, containing that form and the information they managed to put into that form already.
    Then allow them to try again.

    There a way to do this in php or do i have to go looking at javascript???


Comments

  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    If the form and the form handler are the same script (i.e. the form submits to and handles itself) then it shouldn't be too difficult with any server side language. You might, for example, write your form as:
    [PHP]
    <INPUT TYPE="text" NAME="foobar" VALUE="<?=$HTTP_POST_VARS["foobar"]?>">
    [/PHP]
    Thus if you have to show the form again it'll be automatically prefilled.


Advertisement