how about just:

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

hope this helps,
Daan
  ----- Original Message ----- 
  From: Cordaro, Vince 
  To: [email protected] 
  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
  [email protected]
  http://osflash.org/mailman/listinfo/osflash_osflash.org
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to