I have a variable $topic = $POST_['topic'] that is entered by the user, it can possibly have spaces. I want to create a table based on this variable. Right now the code creates the table but only uses the first word.

$create="Create TABLE $topic (I know this part works)";
mysql_query($create);

I tried adding single quotes to

$create="Create TABLE '$topic' (I know this part works)";
mysql_query($create);

but it still only uses the first word to create the table. any suggestions?? Sorry for the lack of code but im at work right now so i can't remember the entire code by memory.. lol...

Thanks in Advance!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.