Jump to content

Need help with collecting CSV data


boldbaba

Recommended Posts

Hey Everyone hope all well. I am in need of your php experience.

 

I will try to explain the best as i can :

 

I have an html form and inside of that form i have a "select a state" option:

 

<select name="State">
<option value="0" selected="selected">Select a State</option>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
   etc.....
</select>

 

When the customer selects a state and then clicks the forms submit button, i want them to get taken to a csv file.

 

Inside of the csv file i have this

 

state, ip
AL,67.100.244.74
AK,68.20.131.135
AK,64.134.225.33
etc.......

 

My goal is to collect the state they choose in the html file and bring it to this csv file. Once it comes to the csv file it chooses an ip address according to the state they choose, then that ip address is sent to me in an email with the rest of the form information.

 

So an example would be: customer fills out the html form and selects Alabama as a state. they then submit the form and the form comes to the csv file where it sees the state Alabama (AL). it then collects the ip and submits that to my email address along with the rest of the html form information (name,email,etc...). It also needs to randomly choose an ip from Alabama because in the csv file i have Alabama (AL) multiple times, so i just chooses anyone of the Alabama ip's

 

 

I hope i am making sense

 

Thanks for all your help

 

Ali

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.