I am having problems concatenating a variable to a number (with the variable first, because $info1002 is not a known variable), I appreciate my problem here must be my single double quotations and I’ve tried a lot of combinations and my googling hasn’t helped.
mysql_query("INSERT INTO users (ID, info1) VALUES ('','.$info.''002')")or die(mysql_error());
you need to format it like this:
Also, if you have the
IDfield set toAutoIncrement, you can ommit it like this:This will insert value of $info followed by 002 into the database.