View Single Post
Old 06-21-2011, 09:14 AM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,678
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Quote:
//But remember inside double quotes $Variables work.. So..
//Remove the excess double quotes and make it tidy:
$sql = "INSERT INTO wall (author, message) VALUES ('$author', '$message')";
When using an associative array variable inside the string, wrap it by curly braces, like

PHP Code:
$sql "INSERT INTO wall (author, message) VALUES ('{$Data['author']}', '{$Data['message']}')"
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote