Afternoon,
I can not figure this out for the life of me. If I take this apart and run it separately it works, put it together the name doesnt show up. 😕
Any thoughts would be great! Thanks so much
Laura
/* construct and run our query */
$sql = "SELECT S.FirstName as FName,S.LastName as LName,L.Interview_Letter,
I.GroupTimeID
FROM Res_Life_Dev.ResLifeLetterTbl L,
AllStudent_Test.Student S,
Res_Life_Dev.InterviewTbl I
WHERE
S.PSID = I.CampusID AND
I.Application_Period = L.Application_Period AND
L.Application_Period = '107701'";
$query = mysql_query($sql) or die ("Query failed: " . mysql_error() . " Actual query: " . $sql);
//put the elements into an array
while($result = mysql_fetch_array($query)) {
$LName = $result["LastName"];
$FName = $result["FirstName"];
$Letter = $result["Interview_Letter"];
//set up the message from the database
$LetterText = array("First_Name", "Last_Name");
$ReplaceText = array($FName, $LName);
$newphrase = str_replace($LetterText, $ReplaceText, $Letter);
//set up the message from the database
echo $newphrase;
echo "<hr />";