|
Posted by Jim Michaels on 01/24/06 23:54
the browser, if I am correct, feeds the variables over the HTTP port like a
terminal, and are read in STDIN like it was coming in from a keyboard. but
I am not sure how they are serialized.
you can use javascript to autosubmit the form.
document.forms[0].submit();
<chris_fieldhouse@hotmail.com> wrote in message
news:1137785695.731371.130980@o13g2000cwo.googlegroups.com...
> Hi fairly new to php, but picking it up quite well.
> the question I have, is it possible for a php script which is used to
> validate values submitted in a form, to then post these values onto
> another script/page or even back to the calling form?
>
> i.e. the application I have in question is a login.htm page with a
> verify.php script
> The login.htm has a Form which captures login_id and password which are
> posted to verify.php
>
> verify.php checks the id and password against the database.
> if the check succeeds I use $_SESSION to track the logged in user into
> the page.
> if the check fails, I use $_SESSION["error"] to set an error message
> and then jump to login.htm, but I've lost the userid.
> The only way I can see of transferring the userid (and some other data)
> is by calling header ("Location: login.htm?id=$uid");
> and then have some php code in login.htm to $GET['uid'] and pop that
> into the user field on the form.
>
> Is there any easy way I can post this data back without using a <FORM>
> or at least a form that can be auto-submitted?
>
> Thanks in advance.
>
[Back to original message]
|