Quote:
Originally Posted by Antivirus
I would suggest handling it with a print_input_select_row funcrion as opposed to many check boxes.
PHP Code:
// #############################################################################
/**
* Prints a row containing an <input type="text" /> and a <select>
*
* @param string Title for row
* @param string Name for input field
* @param string Value for input field
* @param string Name for select field
* @param array Array of options for select field - array(0 => 'No', 1 => 'Yes') etc.
* @param string Value of selected option for select field
* @param boolean Whether or not to htmlspecialchars the input field value
* @param integer Size for input field
* @param integer Size for select field (if not 0, is multi-row)
* @param integer Max length for input field
* @param string Text direction for input field
* @param mixed If specified, overrides the default CSS class for the input field
* @param boolean Allow multiple selections from select field?
*/
*/
function print_input_select_row($title, $inputname, $inputvalue = '', $selectname, $selectarray, $selected = '', $htmlise = true, $inputsize = 35, $selectsize = 0, $maxlength = 0, $direction = '', $inputclass = false, $multiple = false)
Create an array of all your usernames and ids which you want in the dropdown, then use the $selectarray var along with the arrays and it should be a bit more organized, as well as dynamic if the array is created based upon usergroup, etc... 
|
Thanks for the tip! I'll give that a shot.
I'm running into a situation where I have a section of code similar to what I listed below and for some reason, processing falls through all of the code prior to the form being displayed. Does anyone have a simple example of doing this?
Code:
if ($_REQUEST['do']== "add" || $_REQUEST['do']== "edit" )
{
// display form here
}
if ($_POST['do'] == "doAddSave")
{
// Save form data to database
}
Thanks,
Jim