Dear Experts,
I'm having an error, there's no data added...
Here's my PHP Code Below (add.php)
____________________________________________________________
<?php
$host = "localhost";
$user = "joel";
$pass = "";
$database = "personal";
$table = "tblpersonal";
echo "<B>This is a list of items I have in my table named $table</B> <hr>";
// Connecting to the Database
$connect = @mysql_connect($host, $user, $pass) or die("could not connect to server"
@mysql("$database","INSERT INTO $table VALUES(
'ID',
'Name',
'Address')"
// Query the Database
$result = @mysql_query(@mysql) or die("could not complete your query"
?>
____________________________________________________________
And here's my add.html
<html>
<head>
<title>ADD</title>
</head>
<body>
<form method="POST" action ="add.php">
<input type="text" name="Name" size="20"></p>
<p><input type="text" name="Address" size="20"></p>
<p><input name="ID" size="20" type = "hidden"></p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>
____________________________________________________________
Joel,
I'm having an error, there's no data added...
Here's my PHP Code Below (add.php)
____________________________________________________________
<?php
$host = "localhost";
$user = "joel";
$pass = "";
$database = "personal";
$table = "tblpersonal";
echo "<B>This is a list of items I have in my table named $table</B> <hr>";
// Connecting to the Database
$connect = @mysql_connect($host, $user, $pass) or die("could not connect to server"
@mysql("$database","INSERT INTO $table VALUES(
'ID',
'Name',
'Address')"
// Query the Database
$result = @mysql_query(@mysql) or die("could not complete your query"
?>
____________________________________________________________
And here's my add.html
<html>
<head>
<title>ADD</title>
</head>
<body>
<form method="POST" action ="add.php">
<input type="text" name="Name" size="20"></p>
<p><input type="text" name="Address" size="20"></p>
<p><input name="ID" size="20" type = "hidden"></p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>
____________________________________________________________
Joel,