Jump to content

If statement?


SEVIZ

Recommended Posts

I am using this code

$result = mysql_query("SELECT * FROM tech WHERE ID='".$_POST['tech']."'") or die(mysql_error());  


// Print out the contents of the entry 

while($row = mysql_fetch_array($result)){

$NAME = $row['NAME'];
$ID = $row['ID'];
$ALLOW = $row['ALLOW'];
$LOCA = $row['LOCA'];
$TEAM = $row['TEAM'];
}

 

All is fine but how can I make an if statement that if $NAME is Null display "No name"?

 

Thanks for any help!

Link to comment
https://forums.phpfreaks.com/topic/149754-if-statement/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.