Hi Guys,
Something strange happened,
Today when I logged onto a site that I'm building, the code seemed to have errors, despite the fact that I hadn't touched it since I uploaded it initially.
The Code is below:
<?php
if((isset($_GET['id'])) && (is_numeric($_GET['id']))) { //accessed through viewusers.
$id = $_GET['id'];
} elseif ((isset($_POST['id'])) && (is_numeric($_POST['id']))) { //form has been subbed.
$id = $_POST['id'];
} else {
print '<h2> Page Error </h2>';
print '<p class=error> This page has been accessed in error. </p>';
}
?>
It's giving me the page error portion and not recognizing the $id, thereby screwing with my WHERE clause in my SQL query... see below
$query = "SELECT userID, username, password, first_name, last_name, email, gender, blurb, points, games_played, games_won, badges_earned, tournaments_won, dob_day, dob_month, dob_year, dp, badgeID, badges, unlocked, feat_badge, feat_badge_name, feat_badge_xp, level, administration, registration_date FROM users WHERE userID = $id";
Is there any other way to write that $id = _GET ['id']; code as I'm not sure why it would stop working as yesterday it was working fine!