Riquez wrote:
> Hi,
>
> I need to do a redirect that POSTS vars rather than having them in the
> URL.
> I believe this can be achieved with fsockopen() - but I'm not sure how
> to do it!
> Can you help?
>
> I have a registration page that POSTS to itself & then validates all
> the fields.
> If the validation is OK then I need to POST the fields to an ASP script.
> This is because I have to use this certain ASP script (HSBC ePayment) &
> it must be posted to.
>
is using javascript an option?
if so, you can do something like this:
if(isset($submit))
{
// checks here
if(check = true) {
echo "<script type=\"text\javascript\">";
echo "document.getElementById(\"formname\").method=\"post\";";
echo "document.getElementById(\"formname\").action=\"theurl.asp\";";
echo "document.getElementById(\"formname\").submit();";
echo "</script>";
}
else
"error, you're missing something";
}
<form id="formname">
<input type="hidden" name="field1" value="<?php echo
$_POST['field1_val']; ?>" />
.
.
.
.
</form>
if you don't include the hidden form fields in the formid, they wo't be
posted... so make sure you poulate a hidden form on the checks page
BEFORE the js post, or nothing will get posted.
its a hack job, but it works... (as long as js is enabled)
if your on the web, and can't be certain js is on or not, i'm not sure how.
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/