Forum Moderators: coopster

Message Too Old, No Replies

Parse Error - T_IF

         

chief stains

8:55 am on Oct 17, 2005 (gmt 0)

10+ Year Member



Hi,

Getting the following error

Parse error: parse error, unexpected T_IF in...

for this line

<option value=<?php "$var1" if($var1==$form_var1) {echo ("selected");}echo(">"); $var1?></option>

Any one got any ideas...?

mukhtar2t

9:47 am on Oct 17, 2005 (gmt 0)

10+ Year Member




<option value=<?php echo "$var1"; if($var1==$form_var1) {echo (" selected");}echo(">"); echo $var1?></option>

use 'echo' to insert text inside html and dont forget spaces between the attributes

chief stains

10:15 am on Oct 17, 2005 (gmt 0)

10+ Year Member



thanks...