PDA

View Full Version : Flash-PHP email form with drop down list!!!



nitya_arysys
April 29th, 2004, 02:46 AM
Hello,
Can we have an email form in flash with drop down menu (script written in php).
How to retrieve the selected data (text) from the drop down menu, in the php script. Is there any tutorial available on this?

Nitya.

radioxromance
April 29th, 2004, 03:32 AM
okay if I am understanding you correctly, you are looking at something like this:


/*I'm going to assume you have the script all set up to query the db,
and that you can make a query yourself...*/
$query = mysql_query("SELECT * FROM table WHERE row = 'itemNeeded'");
echo '<select name="name">';
while($sort = mysql_fetch_array($query)) {
echo '<option value="' . $sort['rowName'] . '">Option</option>';
}
echo '</option>';

I believe that should do what you need, let me know if I didn't udnerstand or something doesn't work. :)

nitya_arysys
April 29th, 2004, 03:45 AM
I deeply appreciate your reply, but in the email form I am using for my website, there is nothing to do with database. The text entered in the form in flash is processed by PHP script and mailed to an email address. Actually I want to put a drop down list box in it (with say four options). If the user selects any of the option, the PHP script should retrieve that option(text). I hope you understand this.

Nitya.

radioxromance
April 29th, 2004, 03:54 AM
email form in flash with drop down menusorry! For some reason I skipped right over that! Well... I haven't done much with php and flash. I'm going to think this one over, but I doubt I'll come up with much...

prstudio
April 29th, 2004, 11:49 AM
Make a drop down box with your html editor.

Assign that box a value - then each option has its own name.

Now in a form user environment, once you select your option - that combobox will take the value of your drop down -

then setup the form to post to your processing page -

on your processing page (script that does the actual emailing) have it setup to read the value from the combobox...

so if the job of the combobox was to specify "State you live in" value of the combobox was "DropDownValue" then in the script have it read that value using the _Post or _REQUEST command.

Pretty straightforward.

radioxromance
April 29th, 2004, 03:10 PM
oh! I thought... he meant retrieve the info from a db into flash, I was tired last night, should figured that one out when he said there was no DB involved. I am just no help when it comes to a db and flash. But yeah, I think he needed what you wrote prstudio.