Iam a newbie using a localhost with this simple programme
<html>
<body>
<?php
$link = mysql_connect('localhost', 'root', '');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_select_db("--");
$name=isset($_POST["name"]);
$sql="INSERT INTO name SET name='" . mysql_real_escape_string($name) . "'
;
";
if (@mysql_query($sql)){
echo 'new author added';}
else {
' erroe adding new author '.mysql_error();
}
?>
<form action ="post.php" metod="post"/>
<input type='text' name='name' /><br /><br />
<input type='submit' value="GO"/>
</form>
</body>
</html>
it works but when i checked the data in my database i didnt get any thing just data field is blank in name.