<?php
// chat poster
$db = new PDO('mysql:host=127.0.0.1;dbname=wordpower','root','bheq0913');
//secure the chat
if(isset($_POST['text'])&& isset($_POST['name'])){
$text = strip_tags(stripslashes($_POST['text']));
$name = strip_tags(stripslashes($_POST['name']));
if(!empty($text) && !empty($name)){
$insert = $db->prepare("INSERT INTO chat VALUES('', '".$name"', '".$text"') ");
$insert->execute();
echo "<li class="cm"><b>".ucwords($name)."</b> - ".$text."</li>";
}
}
?>
Help me out of this error please, it says
Parse error: syntax error, unexpected '"', '"' (T_CONSTANT_ENCAPSED_STRING) in C:\xampp\htdocs\webko\insert.php on line 12