Hamkaas Posted June 12, 2012 Share Posted June 12, 2012 Good morning, I have this query, but if it's exucuted it just inserts $klantnaam in the database. $klantnaam = $_POST['klantnaam']; mysql_query ('ALTER TABLE sdmr_agentgegm ADD ($klantnaam int(10), $klantnaam_phone int(10), $klantnaam_mail int(10) )'); What am i doing wrong? Quote Link to comment https://forums.phpfreaks.com/topic/264036-using-alter-table-with-a-variable/ Share on other sites More sharing options...
trq Posted June 12, 2012 Share Posted June 12, 2012 Variables are not interpolated within single quoted strings. Quote Link to comment https://forums.phpfreaks.com/topic/264036-using-alter-table-with-a-variable/#findComment-1353107 Share on other sites More sharing options...
Hamkaas Posted June 12, 2012 Author Share Posted June 12, 2012 Thats pretty dumb thank you Quote Link to comment https://forums.phpfreaks.com/topic/264036-using-alter-table-with-a-variable/#findComment-1353116 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.