Jump to content

Cant work out why if its not an empty variable what is it?


todayme

Recommended Posts

Notice below I am trying to say in the code is If ($doit['Status'] == "") if its empty do assign a value.  But it never thinks its empty when it is.  Is this how you check if it is empty?


$query = "select max(ID) from _Replies where LINKID = '$LeadID' AND SenderID = '$findID'";
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_assoc($result) or die(mysql_error());

foreach($row as $key => $val) {

$data = mysql_query("SELECT * FROM _Replies WHERE ID = '$val'")
or die(mysql_error());

  $doit = mysql_fetch_array($data);

If ($doit['Status'] == "") {

$coolstatus = "New Lead";

}

else;

{
$coolstatus = $doit['Status'];
}


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.