Jump to content

How do i make this drop box function sticky?


zartzar

Recommended Posts

Having trouble  :wtf:

 

 

	function tooString()
{
	$text="<tr>
			<td>".$this->label."</td>
			<td>
			<select name='".$this->name."'>";
			//add options to box
			foreach($this->options as $option)
			$text.="<option value='".$option."'>".$option."</option>";			
	$text.="</select>
			</td>
			</tr>";
	return $text;
}

 

Oh ok now I understand :D

 

				//add options to box
			foreach($this->options as $option) {
				$selected = (isset($_POST[$this->name]) && $_POST[$this->name] == $option) ? ' selected="selected"' : null)
				$text.="<option value='".$option."'{$selected}>".$option."</option>";
			}

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.