Basically..
doctor row in people table = doctor id in doctor table
i would like the statement to say, Today your appointment is with Doctor Sean Lister
the rows in the doctors table are
id
firstname
secondname
This is my code so far...
Code: Select all
<?
header ("Content-Type: utf-8");
include("opendbinclude.php");
$result = mysql_query("SELECT * FROM people");
while($row = mysql_fetch_array($result))
{
if ($_REQUEST['text'] == $row['first_name'] . " " . $row['surname'] . " " . $row['postcode'])
header ("Location: http://localhost:8800/?phonenumber=" . $_REQUEST['sender'] . "&text=" . urlencode("Welcome to Sunderland Hospital. Today your appiontment is with " . $row['doctor'] . " at " . $row['time'] . " in room " . $row['room'] . " to get there please follow these directions; " . $row['direction']));
mysql_query("INSERT INTO logs (name, status) VALUES ('" . $row['first_name'] . " " . $row['surname'] . "', 'Signed In')");
}
?>Any help is much appreciated!!
