PDA

View Full Version : Extract Form Data From Drop Down Menu?



BetterThanHybrid
04-13-2008, 05:23 AM
Hey All,

I need to extract the data from the drop down menu's of the "Make", "Year", "Model" drop down fields in this web page form (http://www.preignitioncc.com/betterthanhybrid/addQuote.php)

I tried using this Script (http://www.dynamicdrive.com/dynamicindex11/selectform.htm) but it wasn't selecting the data, or I couldn't get it to.

Could anyone tell me any way possible to do this, is this code protected?

Also does anyone know how to have the options change like they do with using Javascript?


Thanks in advance for your help!

Nile
04-13-2008, 12:44 PM
Can we see your code please?
Nile

Medyman
04-13-2008, 02:13 PM
Hi BetterThanHybrid,

You'll have to explain a little bit more about what your setup is like for us to really help you. What do you need to do with the data once you "extract" it? Save it in a database? Email it to someone?

Without knowing the details, I can only recommend this (http://www.dagondesign.com/articles/secure-php-form-mailer-script/). It's a PHP-powered form processor...very robust and secure.

Another tip about writing forms: If you have a dropdown, you need to specify it's value. If there is no value, then you obviously won't get any results. How do you add a value? Simple. Like so:


<select>
<option value="Acura">Acura</option>
</select>

BetterThanHybrid
04-13-2008, 05:00 PM
Hey Guys,

Thanks for the reply, I appreciate your help.

Ultimately what i'm looking to do is mock that form. I'm going to place it on my site and have it setup with required fields just like it has, for example when you fill out that form if you don't supply your phone number like 000-000-0000 it will reject it.
So what I want to do is have a form that requires the exact same formats as that one, then it will automatically enter each users data into a excel file on my server, then it will automatically (use macro or something) enter the data from the excel sheet into my autoresponder and into the original site I took the form from.

So thats the end result I'm looking to accomplish, my problem right now is I can't extract the Make, Year, Model from that form so that I can even begin to have the same data on my form.

BTW if you know or think there is a better way to accomplish this, please suggest it. I should also mention that I want to be able to have affiliates on my site use the same form but have them able to access it at any time via member login or something, preferably in excel file. I also want to be able to access all data, mine and everyone elses but have individuals access only there own at any time.


I'm telling you all this because I'm open to suggestions for everything and would love to hear maybe a better way of doing it, however the main issue right now is being able to get the same Make, Year, Model data from that form.


Thanks again!

Medyman
04-13-2008, 07:04 PM
So what I want to do is have a form that requires the exact same formats as that one, then it will automatically enter each users data into a excel file on my server, then it will automatically (use macro or something) enter the data from the excel sheet into my autoresponder and into the original site I took the form from.

You have one too many steps there. There is no way to edit an excel sheet via the server. At least, not directly. There are workarounds, but there is no point in going that route.

What you need to do is set up some sort of database (MySQL, for example). MySQL is basically Excel for web applications. Think of it like a spreadsheet where you specify what the columns are. As someone submits a new record, it creates a new row in the database and stores your information.

You would have to use some PHP to accomplish all that you want. Once a user submits the form, you could do the rest of it simultanesously. The PHP script could send the autoresponder (sending a call to some external autoresponder is a messy way of going about it), save the information to your database and present the information back to the site (like on a confirmation page or something).

For this all to work, your server needs to have PHP, MySQL and an accessible smtp port (for mail). You could also use ASP and MSSQL if you have a Windows server, I'm sure.

That should be all the info you need to get started. I don't recommend doing it all at once. You should do it in steps. First, get the info to display on the confirmation page. Then, get it to save to a database. And lastly, tackle the emailing.

Check out www.php-mysql-tutorial.com for the database bit.
Here (http://www.developertutorials.com/tutorials/php/autoresponders-php-050525/page1.html)is a tutorial on autoresponders with PHP.

BetterThanHybrid
04-13-2008, 09:21 PM
hey Medyman,

I'm going to look over SQL and PHP stuff. So if I had a form to excel script which I've seen will post form submissions to a excel server sheet couldn't a macro just auto enter the data into the two websites?
I would use my autoresponder form which I already have and just post it to a url specifically for the macro to enter the data.
I want to keep my site search engine friendly, so I don't know how php will affect that?
I already have my site created as simple html, I'm considering using Joomla for member login and such and would like the simplest route possible to automatically perform the tasks listed but stay search engine friendly. Although the member end of the site I don't care if it's friendly to search engines, but my main index.html and my affiliates urls need to stay friendly.

I do actually already have the confirmation page.

However do you know of any solution to extract the Make, Year, Model from that web page form as listed above?

This is my main concern for right now.