mikes1471 wrote:
Code: Select all
$status=$msgread;
if ($msgread=="1")
$status=="The message has been read";
else
$status=="The message has not been read";
Your getting your operators messed up.
$varOne = $varTwo; // This basically means "Assign the value in $varTwo to $varOne"
$varOne == $varTwo; // This basically means "Does the value of $varOne equal the value of $varTwo"
In your code your mixing them up, it should be:
Code: Select all
$status = $msgread;
if($msgread == "1") {
$status = "The message has been read";
}
else {
$status = "The message has not been read";
}
echo $status;
You should also space your code up abit more so it's easier to read.