I'm using the windows installation of xampp, the newest version. and i'm quite literally stumped. I used to code php a while ago, started dabbling in it but then I got caught up in other things at the time so it took a back burner. Now I may be rusty but I just can't understand why I can't get my code to post to the database. I've tried on a tripod free hosted site and it still doesn't work. anyways heres the code. [code="guestbook.php"]<form method="post" action="guestbookpost.php"> <table cellpadding="6" cellspacing="0"> <tr> <td>Name :</td> <td><input type="text" name="name" /></td> </tr> <tr> <td>Email :</td> <td><input type="text" name="email" /></td> </tr> <tr> <td valign="top">Message :</td> <td><textarea name="message" cols="30" rows="6"></textarea></td> </tr> <tr> <td> </td> <td> <input type="submit" name="submit" value="Add Message" /> <input type="reset" name="reset" value="Clear Message" /> </td> </tr> </table> </form> [/code] [code="guestbookpost.php"]<?php $dbhost ='localhost'; $dbusername = '';//blanked for security $dbpasswd = ''; $database_name = '';//blanked for security if($_POST['submit']) { $connection = mysql_pconnect("$dbhost","$dbusername","$dbpasswd") or die ("Couldn't connect to the database."); $db = mysql_select_db("$database_name", $connection) or die("Couldn't select database."); $sql[addpost] = mysql_query("INSERT INTO guestbook (name, email, message, date) VALUES ('$_POST[name]','$_POST[email]','$_POST[message]',time())"); mysql_close($db); echo "Thanks ".$_POST['name']." your message has been added\n"; include('guestbookentries.php'); } ?> [/code] [code="guestbookentries.php"] <?php $dbhost ='localhost'; $dbusername = ''; //blanked for security $dbpasswd = ''; $database_name = ''; //blanked for security $connection = mysql_pconnect("$dbhost","$dbusername","$dbpasswd") or die ("Couldn't connect to the database."); $db = mysql_select_db("$database_name", $connection) or die("Couldn't select database."); $sql[getPosts] = mysql_query("SELECT name, email, message, date, FROM guestbook order by id DESC LIMIT 10"); while($data = mysql_fetch_array($sql[getPosts])) { $post_date = date('D F jS Y @ g:ia', $data[date]); echo "<div>On $post_date <a href=\"mailto:$data[email]\">$data[user]</a> said:</div>\n"; echo "<div>$data[message]</div>\n\n"; } mysql_close($db); ?> [/code] The code gives me no errors, but it just won't insert the data into the database. I just don't know what the heck i've done wrong :| This happens on both the tripod site and my own installation. I've made sure that the username,database name, password etc are all correct. I'm just stumped. afaik this should work!! Any help would be so greatfully appreciated!