Online Shopping : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to
Did You Find This Entry Useful?

11 of 20 people (55%) answered Yes
Recently 7 of 10 people (70%) answered Yes


Is is possible to redirect a User to another URL and send some variable with the post method?

Mar 15th, 2008 18:30
ha mo, TeraZen, Nicolas Lemay,

Yes it's possible! You must use "HIDDEN" input type in your form, and
use JavaScript so that on form load it will submit the form to the page
you want to redirect...
I've made an example;
<head><title>Submit form Test</title>
<script language="JavaScript">
function submitform()
<body onLoad="submitform()">
<form name="myform" action="">
<input type="hidden" name="myvar" value="somevalue">