redirect users to a URL that has PHP variables populated in it
Hi All:
I am pretty much a newbie to PHP and have (what should be) a pretty
basic question:
I have a html form (5 text fields) that does a post to my php script
page. I grab the form elements from the form and store them in each of
5 variables (got ths part working fine and verified with print
statements).
I then want to:
1) build a url appended with values from the variables included
2) redirect the user to the URL (need to use GET method for this)
3) here I then parse the url for the elements and then populate another
form containing 3 fields (2 text, 1 text area).
The hitch is that 3 of the 5 variable values have to end up in the text
area (named textarea1, seperated by commas) along with their text field
names to label them.
<? php
$Fname = $_REQUEST['Fname'];
$Lname= $_REQUEST['Lname];
$Item1 = $_REQUEST['Item1'];
$Item2 = $_REQUEST['Item2'];
$Item3 = $_REQUEST['Item3'];
//this is where I totally lose it, especially with the syntax and I
maybe need URLencode?
redirect"http://www.mysite.com/collectpage.asp?Fname=[$Fname]&Lname={$Lname]&textarea1=item1:[$Item1],Item2:[$Item2],Item3:{$Item3]
?>
So the final textarea should be poplated with a value of
"Item1:item1value, Item2:Item2value, Item3:item3value"
Yes, the form redirected to is an ASP page (out of my control, no acces
to the code and just need to pas the form values).
Thanks in advance for any help.
Eric B
|