it goes to another page and depending on there username and status it will either display a hidden section or keep it hidden heres the code i'am having problems with
the other thing I would recomend is not to pass the status but do a db look up on it as some one could pass that in the url string and still gain access. for Id just past the userId and do all the checking based on what you have stored in the db.
the other thing I would recomend is not to pass the status but do a db look up on it as some one could pass that in the url string and still gain access. for Id just past the userId and do all the checking based on what you have stored in the db.
hiya thanks for the quick reply yes i see what you mean by the url but if i take the &status= part out of the link it dosnt seem to work but leaving it in if i click the link with a guy with a status over 5 it will still display hidden part so not really what i wanted hmmmm i know ive gone wrong somewhere hehe any pointers please i,ve changed it to user_id but that didnt seem to work either ?
//db connection stuff
$sql="SELECT username FROM tableName WHERE status > 5";
$result = mysql_query($sql) or die (mysql_error());
if(mysql_num_rows($result);
{
//get username and do your thing.
}
this should only display your if section of you get a result from the query.