Hi when let me get straight to the point .....
I've made a database, inserted data into it and selected it on a page but I can't find out why I can't view the text in the table?????????????? :@ I'M SO PISSED OFF!!!!!!!!!
I've been trying it for hours here's my code
//Code for forms data (it's kinda like a mock E-bay sight :))
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Administrator's Page</title>
<link rel="stylesheet" href="style.php" type="text/css" />
</script>
</head>
<body>
<h1 align="center"> Welcome to the administrators page!</h1>
<h5 align="center">Add items to Inventory....</h5>
<hr />
<!-- LINKS START -->
<a href="Shauns_Room_Sale.php">Home</a> |
<a href="Browse.php">Browse Items</a> |
<a href="Suggestions.php">Suggestions Toward Site</a> |
<a href="Order.php">Order an Item</a>
<a href="admin.php">Admin's Only</a>
<!-- LINKS END -->
<table border="0">
<tr>
<?php
$week = date("l");
$Month_day_year = date("F, d, Y");
echo "<td>";
echo "<h3>Today is </h3> " . $week ." ". $Month_day_year;
echo "</td>";
?>
<td>
<form action="add.php" method="POST">
<fieldset>
<legend>Items to add to database</legend>
Item Name: <input type="text" name="item" />
<br />
Item Description: <input type="text" name="description" />
<br />
Item Price:<input type="text" name="price" />
<input type="Submit" value="Submit" /> <input type="Reset" value="Clear Fields" />
</fieldset>
</form>
</td>
</tr>
</table>
</body>
</html>
//now starts WHAT I CAN'T SEEM TO FIND OUT the server side scripting....
<a href="page_pass.php">Back to admin page</a> | <a href="Shauns_Room_Sale.php" >Home</a>
<?php
$con = mysql_connect("localhost", "root", "");
mysql_select_db("inventory_db", $con);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("inventory_db", $con);
$sql="INSERT INTO item_inventory ()
VALUES
('$_POST[item]','$_POST[description]','$_POST[price]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "<h1 align='center'>1 record added</h1>";
mysql_close($con)
?>
I do apologize if I confuse someone but can anyone help?
...Oh yeah I'm using XXAMP and phpmyadmin if that helps finding the problem