session_start(); //continue session
$courseArray = array(); //create array to store current course info
$courseArray = $_SESSION['course']; //fill array
$currentTitle = (string)$courseArray[0][0];
$currentDescription = (string)$courseArray[0][1];
$currentRecPrep = (string)$courseArray[0][14];
$newTitle = (string)$_POST["title"];
$newDescription = (string)$_POST["description"];
$newRecPrep = (string)$_POST["recPrep"];
if($currentTitle == $newTitle)
{
echo "succuse";
}
The above code is taking data from a form submitted on a previous page and checking if the data the user submitted is different from the data that was already there, which is stored in a session variable. The title, description, and recPrep are being sent from another page, and are submitting the correct values.
Now here's the part that's had me pulling out hair for the past hour: the strings being compared are identical, but the condition never completes. When I echo out the two titles just before the condition they print exactly the same thing, but the condition will not complete. What is wrong?
Someone please help. Thanks.