dcorner Posted January 23, 2010 Share Posted January 23, 2010 How do I get a form field variable in a php string. Even though form is submitted through POST method I want to pass through the variables in the form input ("fields_email" and "fields_fname") in the URL to the redirecting page. <form method=post action="https://app.icontact....." name="icpsignup" id="icpsignup1111" accept-charset="UTF-8" onsubmit="return verifyRequired1111();" > <input type=hidden name=redirect value="domain/passthroughtest2.php?email=<?php echo $fields_email;?>&fname=<?php echo $fields_fname;?>" /> <input type=text name="fields_email"> <input type=text name="fields_fname"> <input type="submit" name="Submit" value="Submit"></td> Cheers, David Link to comment https://forums.phpfreaks.com/topic/189497-passing-through-form-variables/ Share on other sites More sharing options...
spfoonnewb Posted January 23, 2010 Share Posted January 23, 2010 You will have to put the redirect URL in the script and use $_POST, or use javascipt to do that. Link to comment https://forums.phpfreaks.com/topic/189497-passing-through-form-variables/#findComment-1000267 Share on other sites More sharing options...
dcorner Posted January 23, 2010 Author Share Posted January 23, 2010 You will have to put the redirect URL in the script and use $_POST, or use javascipt to do that. This may sound really stupid (I am just starting out), is this really involved? Cheers, D Link to comment https://forums.phpfreaks.com/topic/189497-passing-through-form-variables/#findComment-1000271 Share on other sites More sharing options...
spfoonnewb Posted January 23, 2010 Share Posted January 23, 2010 The javascript can be, but adding the URL to the script is very simple ( it depends on the script though, and whether you can customize it ( which depends on if you're using it elsewhere ) ). Link to comment https://forums.phpfreaks.com/topic/189497-passing-through-form-variables/#findComment-1000276 Share on other sites More sharing options...
dcorner Posted January 23, 2010 Author Share Posted January 23, 2010 thanks man, this gives me some direction for where to go next. cheers D. Link to comment https://forums.phpfreaks.com/topic/189497-passing-through-form-variables/#findComment-1000373 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.