RE: re: some problems with php form

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19 October 2005 19:24, Jay Blanchard wrote:

> [snip]
> <input class="<?PHP if ($error_msg) {echo "error"} else {echo
> "normal"}?>" id="firstname" name="firstname" type="text" value="<?php
> echo $_POST['firstname'] ?>"> 
> 
>   how would I fix this error?
> [/snip]
> 
> You are missing several semi-colons;
> 
> <input class="<?PHP if ($error_msg) {echo "error";} else {echo
> "normal";}?>" id="firstname" name="firstname" type="text"

Hands up to those two, I didn't check carefully enough!!  (Actually, I so seldom use the brace style that I probably just forgot PHP doesn't let you omit that semicolon ;)

> value="<?php echo $_POST['firstname']; ?>"> 

Nope, that one's definitely not necessary -- I actually think it looks ugly, so never put one in just before ?>

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: m.ford@xxxxxxxxxxxxxx
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 


To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux