[PHP] eval on php embedded html

2002-01-24 Thread DigitalKoala

hi folks,

i'm having a problem using eval.

i have some html code interdispersed with php code (proper statement not
just variables) in a database.  when i fetch the code and display it using :

$reg_adv_html=addslashes($reg_adv_html);
eval(\$reg_adv_html = \$reg_adv_html\;);
$reg_adv_html=stripslashes($reg_adv_html);

  print $reg_adv_html;

the variables work (their values are substitued), but my condtional staments
don't work.

example from $reg_adv_html :

TD valign=centerinput type=radio name=radiobutton1 value=reg1 ?
if ($radiobutton1==on) { print selected; ? /TD


can someone tell me if i have to remove the ? ? tags from the html?

thanks very much!

dk



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] eval on php embedded html

2002-01-24 Thread Atanas Vassilev

 So, either:

 ? if ($radiobutton1 == on) { print selected; } ?

 Or

 ? if ($radiobutton1 == on) print selected; ?

I found it very convenient for in-html coding to use the following
structure:

input blabla bla ? echo($radiobutton1 == on ? selected : );?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]