[osflash] AMFPHP INserting into database, Please HLP

D.N. xangadix at hotmail.com
Tue May 1 11:54:49 EDT 2007


ehr... I mean:

$query = "INSERT INTO Accounts SET username='$username', password='$password', email='$email'"

forgot the SET, my bad!

Daan
  ----- Original Message ----- 
  From: D.N. 
  To: Open Source Flash Mailing List 
  Sent: Tuesday, May 01, 2007 5:06 PM
  Subject: Re: [osflash] AMFPHP INserting into database, Please HLP


  how about just:

  $query = "INSERT INTO Accounts username='$username', password='$password', email='$email'"

  hope this helps,
  Daan
    ----- Original Message ----- 
    From: Cordaro, Vince 
    To: osflash at osflash.org 
    Sent: Tuesday, May 01, 2007 4:27 PM
    Subject: [osflash] AMFPHP INserting into database, Please HLP


    I am having trouble getting my insert into my mysql database to work. 

    My database has a table called Accounts and I 4 fields, 

    ID, primary Key, Int
    username, varchar
    password, varchar
    email, varchar

    I have tried all kinds of different things.  I just can't seem to find a tutorial on how to write to the database.

    This is my actually PHP insertAccount function:

        /**
            mysql_query("INSERT INTO Accounts(NULL,'".addslashes($username)."',
             '".addslashes($password)."',
             '".addslashes($email)."')");
             **/
             $sql = sprintf("INSERT INTO Accounts(NULL,%s,%s,%s)",$username,$password,$email);
            
             $query = mysql_query($sql);
            
             //return mysql_insert_id();
             return $query;




    Vince



----------------------------------------------------------------------------


    _______________________________________________
    osflash mailing list
    osflash at osflash.org
    http://osflash.org/mailman/listinfo/osflash_osflash.org



------------------------------------------------------------------------------


  _______________________________________________
  osflash mailing list
  osflash at osflash.org
  http://osflash.org/mailman/listinfo/osflash_osflash.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/osflash_osflash.org/attachments/20070501/3bcaeede/attachment-0001.htm


More information about the osflash mailing list