sending usernames to php script

Discussion in 'Integration' started by acrs, Feb 6, 2011.

  1. acrs

    acrs New Member

    Joined:
    Feb 6, 2011
    Messages:
    1
    hi when a user logs in they are taken to a page where they can play mp3 and
    download them but for the user can download a mp3 my script checks a data base for the download limit all users start off with 5 downloads per month .I need amember to store the logged in user name to a variable so that mysql knows where to look

    Code:
    $q=mysql_query("UPDATE downloads SET mdr = '4' WHERE username = '$y'");
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You can use this session variale:
    $_SESSION[_amember_user][login]

Share This Page