Starting to get desperate (need other PHP coders)

Results 1 to 7 of 7
  1. #1
    Account Upgraded | Title Enabled! CobraCom is offline
    MemberRank
    Jul 2008 Join Date
    382Posts

    Starting to get desperate (need other PHP coders)

    I'm starting to get desperate so I need help from other good PHP programmers.
    I'm working on a registration page, which works except for this problem:

    Registering an account into Account.dbo works, but then the code needs to fetch the AID from that table,
    and register it into Login.dbo with that AID value.
    The AID never gets caught, and using var_dump($aid), results in "NULL".

    This is the code I'm using: (not the full code ofcourse).
    Code:
    $selAcq = mssql_query("SELECT AID FROM Account WHERE UserID='$name'");
    $aid = $selAcq['AID'];
    echo $aid;
    $inLog  = "INSERT INTO Login(AID,UserId,Password,LastIP) VALUES('$aid','$name','$pass','$ip')";
    mssql_query($inLog);
    If anyone has the answer, post it.


  2. #2
    Programming Addict Lambda is offline
    MemberRank
    Sep 2007 Join Date
    SpainLocation
    393Posts

    Re: Starting to get desperate (need other PHP coders)

    Quote Originally Posted by CobraCom View Post
    I'm starting to get desperate so I need help from other good PHP programmers.
    I'm working on a registration page, which works except for this problem:

    Registering an account into Account.dbo works, but then the code needs to fetch the AID from that table,
    and register it into Login.dbo with that AID value.
    The AID never gets caught, and using var_dump($aid), results in "NULL".

    This is the code I'm using: (not the full code ofcourse).
    Code:
    $selAcq = mssql_query("SELECT AID FROM Account WHERE UserID='$name'");
    $aid = $selAcq['AID'];
    echo $aid;
    $inLog  = "INSERT INTO Login(AID,UserId,Password,LastIP) VALUES('$aid','$name','$pass','$ip')";
    mssql_query($inLog);
    If anyone has the answer, post it.

    you need to fetch the result.

    $selAcq = mssql_query("SELECT AID FROM Account WHERE UserID='$name'");
    $fetch = mssql_fetch_array( $selAcq );
    $aid = $fetch['AID'];
    echo $aid;
    $inLog = "INSERT INTO Login(AID,UserId,Password,LastIP) VALUES('$aid','$name','$pass','$ip')";
    mssql_query($inLog);

  3. #3
    Account Upgraded | Title Enabled! Asumi is offline
    MemberRank
    Aug 2008 Join Date
    209Posts

    Re: Starting to get desperate (need other PHP coders)

    Lambda plz read my pm i send to you it's about something personal not any question about gunz or something just read

  4. #4
    Account Upgraded | Title Enabled! CobraCom is offline
    MemberRank
    Jul 2008 Join Date
    382Posts

    Re: Starting to get desperate (need other PHP coders)

    Quote Originally Posted by Lambda View Post
    you need to fech the result.
    That worked. Also, not to be rude, but didnt you quit gunz?

  5. #5
    DRGunZ 2 Creator wesman2232 is offline
    MemberRank
    Jan 2007 Join Date
    Erie, PALocation
    4,872Posts

    Re: Starting to get desperate (need other PHP coders)

    Quote Originally Posted by CobraCom View Post
    That worked. Also, not to be rude, but didnt you quit gunz?
    Lambda is comming back cause he has the latest server files and official MAIET documents.

  6. #6
    Proficient Member bunny1995 is offline
    MemberRank
    Jul 2008 Join Date
    -Next To You-Location
    193Posts

    Re: Starting to get desperate (need other PHP coders)

    This might help you, http://forum.ragezone.com/f497/insta...server-518187/
    and you need the final revolution gunz web maded by ~DN try searching i`m not sure if the post is still there.

  7. #7
    Praise the Sun! Solaire is offline
    MemberRank
    Dec 2007 Join Date
    Undead BurgLocation
    2,862Posts

    Re: Starting to get desperate (need other PHP coders)

    Quote Originally Posted by CobraCom View Post
    That worked. Also, not to be rude, but didnt you quit gunz?
    Better do it in ODBC though.

    PHP Code:
    $query odbc_exec($connect,"SELECT AID FROM Account WHERE UserID = '$name'");
    odbc_fetch_row($query);
    $aid odbc_result($query1); 



Advertisement