help please on browsererm table

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    help please on browsererm table

    hi getting back into coding again but came across a bug

    browserm table when a user logs in seems to update all users with your browser if it isnot recognised

    ive tried following

    PHP Code:

    $HTTP_USER_AGENT 
    mysql_escape_string($HTTP_USER_AGENT);
    $agent ="$HTTP_USER_AGENT";

    $res mysql_query("UPDATE ibwf_users SET browserm='".mysql_real_escape_string($agent)."', ipadd='".mysql_real_escape_string($uip)."' WHERE id='".getuid_sid($sid)."'"); 
    but it seems to not just update just the one user as it should
    -------------------------------------------------------------
    please note if u change browser or inject it with any other table data this doesnt happen

    Added after 3 minutes:

    dont worry issues solved
    Last edited by ozziemale31; 19.06.12, 01:07.









    Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
    Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free


    #2
    Originally posted by ozziemale31 View Post
    but it seems to not just update just the one user as it should
    -------------------------------------------------------------
    please note if u change browser or inject it with any other table data this doesnt happen

    Added after 3 minutes:

    dont worry issues solved
    PHP Code:
    $agent=$_SERVER['HTTP_USER_AGENT'];
    $res mysql_query("UPDATE ibwf_users SET browserm='".mysql_real_escape_string($agent)."', ipadd='".mysql_real_escape_string($uip)."' WHERE id='".getuid_sid($sid)."'"); 
    simple mysql_real_escape_string should solve your problem use mysql_escape_string if you have a low php version also $agent ="$HTTP_USER_AGENT"; is wrong , you should pass only the variable equal without qoutes " " and also ! the right form for requesting user agent is $_SERVER['HTTP_USER_AGENT']; not $HTTP_USER_AGENT . hope it helps :p
    This is ten percent luck, twenty percent skill
    Fifteen percent concentrated power of will
    Five percent pleasure, fifty percent pain

    And a hundred percent reason to remember the name!

    Comment


      #3
      Originally posted by just_m3. View Post
      PHP Code:
      $agent=$_SERVER['HTTP_USER_AGENT'];
      $res mysql_query("UPDATE ibwf_users SET browserm='".mysql_real_escape_string($agent)."', ipadd='".mysql_real_escape_string($uip)."' WHERE id='".getuid_sid($sid)."'"); 
      simple mysql_real_escape_string should solve your problem use mysql_escape_string if you have a low php version also $agent ="$HTTP_USER_AGENT"; is wrong , you should pass only the variable equal without qoutes " " and also ! the right form for requesting user agent is $_SERVER['HTTP_USER_AGENT']; not $HTTP_USER_AGENT . hope it helps :p

      $agent ="$HTTP_USER_AGENT";
      selects the function of $HTTP_USER_AGENT which is stated below
      $HTTP_USER_AGENT = mysql_escape_string($HTTP_USER_AGENT);

      i fixed it earlier it was sending it to all users in the field now it sends to the field of the user logging in ive covered the whole part of the site where info is retrieved and or posted or updated etc with mysql_real_escape_string
      and btw im running the latest version of php5 and coding the script to not rely on globals
      Last edited by ozziemale31; 19.06.12, 21:35.









      Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
      Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free

      Comment


        #4
        What ll be happened

        Comment

        Working...
        X