PDA

View Full Version : Passing selections from form to html page?



zoobie
June 17th, 2002, 01:06
I'm using a php mailer that's kinda goofy.

From my form.html page, how do I pass selected items from drop down boxes to my sent.html page in the same directory which is being sent?

Example: below is form.html

<html><head></head><body>
<form>
<select name=pic>
<option name=doof>Doof</select>
<option name=goof>Goof</select>
</form></body></html>


I need the selection passed to the html doc named send.html below

<html><head></head>
<body><center><img src="????"></img></center>
</body></html>


Thanks :rolleyes:

biggulp
June 17th, 2002, 04:14
form.html

<html><head></head><body>
<form action="sent.html" method="POST">
<select name="pic">
<option value="doof.gif">Doof
<option value="goof.gif">Goof
</select>
</form></body></html>


sent.html (shouldn't it be .php?)

<html><head></head>
<body><center><img src="<?=$HTTP_POST_VARS['pic']?>"></img></center>
</body></html>

zoobie
June 17th, 2002, 05:47
Well, it's a mailer and the <form action="mymailer.php" method="post"> is already taken. What it does is sift thru my directory and picks out the send.html page and sends it as an html email. I need to insert the selected image from my form page image right before it's sent.

I'm lost but you seem to be on the right track. Like I said...it's a goofy mailer that sends an already made html file as mime mail. :rolleyes:

biggulp
June 17th, 2002, 05:52
why don't you just mail the appropriate html in the script instead of using a html file?

zoobie
June 17th, 2002, 13:26
I don't know. That's the way its set up. It just gets an html page and inserts it into the emailer then sends it.

Is it possible to use 2 actions on the same page and time delay one?

Thanks :rolleyes:

biggulp
June 18th, 2002, 03:22
what do you mean by time delay?

anyway you can read more about html email here: http://www.php.net/manual/en/function.mail.php