Getting PHP to ammended the selected in option field


Posted on 16th Feb 2014 07:03 pm by admin

Hey Guys

thanks for everyones help so far. This site and its users are oozing awesomness.

I am busy with a php script for editing users, of which 1 field is the TITLE of the person (mrs, miss, ms) and it is displayed as a dropdown box. I have written the code which allows you to get the values in the fields for the rest of the fields, but I am not sure how to get PHP to change the actual selected dropdown box. The only thing I can think of is to have a if else statement for each option in the select dropdown, but I assume that when someone has a lot of options in their SELECT dropdown, it will be a lot of work and I am sure someone knows the trick behind this

Any suggestions?

No comments posted yet

Your Answer:

Login to answer
304 Like 24 Dislike
Previous forums Next forums
Other forums

Displaying image from database
Hi,

I've got a site where that's got a database behind it. Currently it has loads of items in

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

Prevent PHP mail( ) from appending hostname to from address
Hey guys,

I want to be able to send texts to phones via email (since each phone has their own

strtotime issue
Hey all,

I'm playing around with some code, and basically the idea is:

Person changes

mail() problem
Hi Guys,

I've set up a contact email form. It sends the information fine, but it sends it to

Table trouble
i have been reading the forum for a few weeks and decided to join. i like the format and the advice

i need help with php header and footer
I have designed a header and footer for my site and they seem to be ok when they are running individ

Advice on how to delete a mysql row using my form
Hi,

I am very new to php and am struggling to work out how to delete a portfolio item (a row

Multiple Options for a Single Page
For this example I want to use the Handlers option which is under Fed Admin and all the related codi

AJAX form submit
I recently built a form that submits data to my database with an ajax function that is called throug

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash