Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include_once ("scripts/connect_to_mysql.php");
- include_once ("scripts/checkuserlog.php");
- if ($_GET['newgame'] == 1)
- {
- /// NEW GAME STARTED
- $sql = mysql_query("SELECT name, para_1, para_2, gcs, hr, defib_shocks, sats FROM game WHERE mem_id = '{$_SESSION['id2']}'");
- while($row = mysql_fetch_array($sql))
- {
- $name = $row['name'];
- $CauseOrCondition = $row['para_1'];
- $age = $row['para_2'];
- $gcs = $row['gcs'];
- $hr = $row['hr'];
- $defib_shocks = $row['defib_shocks'];
- $oxSats - $row['sats'];
- $name2 = "";
- $sql2 = mysql_query("SELECT * FROM names WHERE id = '$name' LIMIT 1");
- while($row = mysql_fetch_array($sql2))
- {
- $name2 = $row['name'];
- $heart_status = "";
- if ($hr == 0)
- {
- $heart_staus = '. No pulse at scene and Resus performed, ' . $defib_shocks . ' Shocks given.';
- }
- else
- {
- $heart_status = ', Heart Rate ' . $hr . ' and SATs of ' . $oxSats . '%. ';
- }
- $msgToUser = ' Hi, this is ' . $name2 . ', ' . $age . ' years old, ' . $CauseOrCondtion . ' ' . $heart_status . '';
- }
- }
- }
- include_once 'msgToUser.php';
- exit();
- ?>
Add Comment
Please, Sign In to add comment