query("SELECT * FROM survey WHERE survey_id=".$sid); if($result) { while ( $row = $result->fetch_assoc() ){ $sName = $row['survey_name']; $sUrl = $row['survey_url']; } } if ($sUrl == ''){ $sUrl = 'https://clinicaltrials.westernsydney.edu.au/surveys/?s=T3PXA79KXN'; } ?> query("SELECT * FROM user_account WHERE username='".$username."'"); if($result) { while ( $row = $result->fetch_assoc() ){ $user_id = $row['user_id']; } } $conn->close(); ?>