Solved

Silly if question

Posted on 2002-07-29
2
207 Views
Last Modified: 2012-05-04
hiya

if ( $inf["sex"] == 'F' ) {
   echo "<font color = red>";
   echo $inf["lname"].", ".$inf["fname"]."<br>";
   echo "</font>";
}

else (
   echo "<font color = blue>";
   echo $inf["lname"].", ".$inf["fname"]."<br>";
   echo "</font>";
}

if i comment out the else section, only females show up in red, however in this setup with the else i get: Parse error: parse error, unexpected T_ECHO in /ua/jon/public_html/editscores.php on line 53



any idea to fix would be greatly appreciated!


0
Comment
Question by:weinrj
2 Comments
 
LVL 1

Accepted Solution

by:
majorspank earned 50 total points
ID: 7186418
You have a round bracket '(' instead of a curly bracket '}'
0
 

Author Comment

by:weinrj
ID: 7186427
BLARG!!!!!!!!!!!!!!!!!!!!!

i knew it!!  it was something very very very very very dumb!!!

dunno how i managed to pull that off, but i guess at 1280x1024 it looked the same!!!

lol
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now