php - What is wrong with this MySQL insert statement? -


i beginning php/mysql developer, , have written statement insert username , password database make account. reason getting error though; what's wrong?

mysql_query("insert signup (username, password, email) values ($username, $password, $email)") or die ("cnnot run query"); 

put quotes around $username, $password , $email.

you should use prepared statements. such usage prone sql injections


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -