Hi everyone hope all well. I am needing your valuable expertise in a problem i am having. I will try to explain below.
I have a form and inside of that form i have a "select a state" option:
When the customer selects a state and then clicks the forms submit button, i want them to get taken my mysql database and pull an ip address from the table relevant to what they choose.
I have created a table inside of phpmyadmin with two fields.
the first is: state,varchar,3 0,primary
the second is: ip,text
I then imported an csv file which populated it with the following format
state ip
AL 67.100.244.74
AK 68.20.131.135
AK 64.134.225.33
etc.......
So an example would be: customer fills out the form and selects Alabama as a state. They then submit the form and the form connects to the database where it sees the state Alabama (AL). It then collects the ip from the ip section releated to the ALbama section, and submits that to my email address along with the rest of the form information (name,email,etc ...). It also needs to randomly choose an ip from Alabama because in the database i have Alabama (AL) multiple times, so it just chooses anyone of the Alabama ip's
I hope i am making sense
Thanks for all your help
Ali
I have a form and inside of that form i have a "select a state" option:
Code:
<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>
I have created a table inside of phpmyadmin with two fields.
the first is: state,varchar,3 0,primary
the second is: ip,text
I then imported an csv file which populated it with the following format
state ip
AL 67.100.244.74
AK 68.20.131.135
AK 64.134.225.33
etc.......
So an example would be: customer fills out the form and selects Alabama as a state. They then submit the form and the form connects to the database where it sees the state Alabama (AL). It then collects the ip from the ip section releated to the ALbama section, and submits that to my email address along with the rest of the form information (name,email,etc ...). It also needs to randomly choose an ip from Alabama because in the database i have Alabama (AL) multiple times, so it just chooses anyone of the Alabama ip's
I hope i am making sense
Thanks for all your help
Ali
Comment