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? 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. 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 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
Archived
This topic is now archived and is closed to further replies.