djanim8 Posted August 16, 2006 Share Posted August 16, 2006 I'm getting errors on this line of code:<option value="1" <?PHP if($row["catagoryNum"] == "1") { echo "selected" } ?>>Option 1</option>can you have an if statement on a single line? or do I have to convert it to this:<option value="1" <?PHP if($row["catagoryNum"] == "1") { echo "selected" }?>>Option 1</option> Quote Link to comment Share on other sites More sharing options...
bbaker Posted August 16, 2006 Share Posted August 16, 2006 try adding a space between the >><option value="1" <?PHP if($row["catagoryNum"] == "1") { echo "selected" } ?[color=red]> >[/color]Option 1</option>actually,try adding a ; after "selected"<option value="1" <?PHP if($row["catagoryNum"] == "1") { echo "selected"[color=red];[/color] } ?> >Option 1</option> Quote Link to comment Share on other sites More sharing options...
ryanlwh Posted August 16, 2006 Share Posted August 16, 2006 it's the ; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.