KateMacwil Posted May 16, 2018 Share Posted May 16, 2018 Hi I have created a file called tenders-update.php which allows the user to update an existing record. One of the fields (a select element called "type") is on this page. I have defined an array of available options for the type as follows: $options = array ('Construction' => 'Construction', 'Goods' => 'Goods', 'Services' => 'Services'); I have also written a function which takes the $options array and the $type variable: MakeTypeOpts($options, $type) When I run this page, the select list contains the contents of the $options variable over and over and the $type variable is not selected. I am trying to figure out what I'm doing wrong here. tender-functions.php tenders-update.php Link to comment Share on other sites More sharing options...
justsomeguy Posted May 16, 2018 Share Posted May 16, 2018 I don't see anything in that code which would cause that, but you can have it print out the array of options or other things to verify what it's doing. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now