PDA

View Full Version : What's wrong with this?


N!ck
10-17-2003, 12:50 PM
Tubedogg insisted that inserting a record into the setting table in the database constitutes hacking and that I should ask about this problem here, so here it is:

I'm using the following in the "optioncode" field in the setting table for one of my custom settings. It's producing a parse error when I load the corresponding section of the options. Does anyone see the error?

<select name=\\"setting[$setting[settingid]]\\">\r\n<option value=\\"1\\" ".iif($setting[value]==1,"selected","").">GD</option>\r\n<option value=\\"2\\" ".iif($setting[value]==2,"selected","").">ImageMagick</option>\r\n</select>

Any insight will be greatly appreciated.

assassingod
10-17-2003, 02:33 PM
This worked for me:

<select name=\"setting[$setting[settingid]]\">
<option value=\"1\" ".iif($setting[value]==1,"selected","").">GD</option>
<option value=\"2\" ".iif($setting[value]==2,"selected","").">ImageMagick</option>
</select>

Dean C
10-17-2003, 03:54 PM
If you go to setting.php and look for the version of GD you'll have some sample code :)