ciao a tutti.
tempo fa ho iniziato a leggere le guide di questo sito e provai lo script d'esempio per la gestione utenti, in particolare per la registrazione (link html.it).
tutto andò bene, lo script funzionava.
ora sto provando ad adattarlo ad un altro database, ma ho dei problemi con l'istruzione insert into..
il codice che causa un errore è questo:
mysql_query("
USE ".$_CONFIG['dbname']."
INSERT INTO ".$_CONFIG['table_register']."
(user, email, password, temp, regdate, uid)
VALUES
(' ".$data['user']." ', ' ".$data['email']." ', MD5(' ".$data['password']." '),
'1', ' ".time()." ', ' ".$id." ')")
or die("Connessione non riuscita: " . mysql_error());
e l'errore è il seguente:
Connessione non riuscita: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO register (user, email, password, temp, regdate, uid) VALUES ' at line 2...
ho provato a cambiare gli apici, ad ometterli quando un campo è numerico.. non sono ancora riuscito a capire però quale è esattamente il problema.
se qualcuno può aiutarmi mi farebbe un gran favore.
grazie mille
matteo