> You can pass parameters in the URL for a POSTed form:[color=blue]
>
> ## page2
> <form method="post" action="page3.p hp?data=$urlenc oded_data">
> <input type="text" name="address">
> <input type="submit">
> </form>
>
> ## page3
> mail('your_addr ess@example.com ', 'form data with contact details',
> "Someone entered this data:\n\n" .
> "{$_GET['data']}\n\n" .
> "The user details are:\n" .
> " address: {$_POST['address']}");[/color]
Thanks for all the previous help guys!
I'm halfway there, I think. I'm getting my POST data through to the
next page, but I'm not sure how or if I can use the URLENCODE command within
the form? Whereas I used to have the data passed on like so:
echo '<a href="mail.php? radiochoice=', urlencode($radi obutton),
'&radiomoderntr ad=', urlencode($radi omoderntrad),
'&radiocoord= ', urlencode($radi ocoord),
'&radiopacking= ', urlencode($radi opacking),
'&i1=', urlencode($item 1),
'&i2=', urlencode($item 2),
'&i3=', urlencode($item 3),
'&i4=', urlencode($item 4),
'&i5=', urlencode($item 5),
'&i6=', urlencode($item 6), ETC.
when I try to do a (obviously botched?!) cut and paste job to get the
following:
<form name="form1" method="post" action="finalte st.php?stevetes t=",
urlencode($item 1),' stevetest2=', urlencode($item 2),'">
<p>
<input type="text" name="textfield ">
</p>
<p>
<input type="submit" name="submit" value="Submit">
</p>
</form>?>
I get a 'Parse error: parse error, unexpected '<'' - yes, my grasp is syntax
is pretty crappy, but I'm no programmer - just a GFX guy trying to learn!
Anyone able to help me mastering this last piece of my jigsaw?
THANKS!
Steve
>
> ## page2
> <form method="post" action="page3.p hp?data=$urlenc oded_data">
> <input type="text" name="address">
> <input type="submit">
> </form>
>
> ## page3
> mail('your_addr ess@example.com ', 'form data with contact details',
> "Someone entered this data:\n\n" .
> "{$_GET['data']}\n\n" .
> "The user details are:\n" .
> " address: {$_POST['address']}");[/color]
Thanks for all the previous help guys!
I'm halfway there, I think. I'm getting my POST data through to the
next page, but I'm not sure how or if I can use the URLENCODE command within
the form? Whereas I used to have the data passed on like so:
echo '<a href="mail.php? radiochoice=', urlencode($radi obutton),
'&radiomoderntr ad=', urlencode($radi omoderntrad),
'&radiocoord= ', urlencode($radi ocoord),
'&radiopacking= ', urlencode($radi opacking),
'&i1=', urlencode($item 1),
'&i2=', urlencode($item 2),
'&i3=', urlencode($item 3),
'&i4=', urlencode($item 4),
'&i5=', urlencode($item 5),
'&i6=', urlencode($item 6), ETC.
when I try to do a (obviously botched?!) cut and paste job to get the
following:
<form name="form1" method="post" action="finalte st.php?stevetes t=",
urlencode($item 1),' stevetest2=', urlencode($item 2),'">
<p>
<input type="text" name="textfield ">
</p>
<p>
<input type="submit" name="submit" value="Submit">
</p>
</form>?>
I get a 'Parse error: parse error, unexpected '<'' - yes, my grasp is syntax
is pretty crappy, but I'm no programmer - just a GFX guy trying to learn!
Anyone able to help me mastering this last piece of my jigsaw?
THANKS!
Steve
Comment