This is bothering me beyond belief I'm hoping that someone here might be able to help me. I've tried playing around with a few permissions, that could be the problem. Basically if I try to create/open a database it will create an error I've narrowed it down to this one line and it's the first one which leads me to believe that it's either a php configuration problem or a permissions thing. Running IIS 7.0
<html>
<body>
<?php
$dbh = new PDO('sqlite:poems.sqlite');
?>
<?php
//phpinfo();
$name=$_POST["userName"];
$contact=$_POST["userContact"];
$poem=str_replace("
","<br />",$_POST["userPoem"]);
$comment=str_replace("
","<br />",$_POST["userComment"]);
$query='INSERT INTO '.$dbh.' (name,contact,body,desc) VALUES ('.$name.','.$contact.','.$poem.','.$comment.')';
echo $query;
/*$db->exec('INSERT INTO '.$db.' (name,contact,body,desc) VALUES ('.$name.','.$contact.','.$poem.','.$comment.')');*/
?>
<p>
<b>Your name:</b> <?php echo $name; ?><br />
<b>Your contact info:</b> <?php echo $contact; ?><br />
<b>Your Poem:</b><br /> <?php echo $poem; ?><br />
<b>Your Comments:</b><br /> <?php echo $comment; ?>
</p>
</body>
</html>
<?php $dbh = null; ?>
Any and all help is appreciated. Would Apache be any better? I'm considering just switching over if so.