check null value
| From: | Jacky@lilst | Date: | Tue, 23 Jan 2001 21:17:34 +0000 |
| Subject: | check null value | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-36147@lists.php.net to get a copy of this message | ||
If I have one input text box that when it is submitted to next page, I want to check first if it is
nothing, then write "na" on next page, else just echo whatever it is, is it correct to do
this?
if ($fieldname == ""){
$fieldname ="na";
}
...
(then come to the html bit below)
<td><?php echo $fieldname ?></td>
I wonder specificly about the check if it is null part if it is corerct. Any thoughts?
Jack
jacky@activelifestyle.com
"There is nothing more rewarding than reaching the goal you set for yourself"