php - SQL Query based on URL -
i have sql query brings information based on sessions cookie.
i want make link users profile , have url account.php?id=danny want run sql query pass through bit after ?id=
my current sql query
select id,firstname,lastname,usr,admin,email,car tz_members usr='{$_session['usr']}'"
i want make username url
you variables passed through url $_get
. so
$user = $_get['id']; //check $user variable avoid sql injections $sql = "select id,firstname,lastname,usr,admin,email,car tz_members usr='".$user."'
Comments
Post a Comment