Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

[php] forms and redirection

  • 03-01-2003 02: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