llorax
03-28-2007, 05:31 AM
How come I keep getting this message: "Could not send query: Column count doesn't match value count at row 1"
<?php
include 'session.inc.php';
include 'config.inc.php';
include 'db.inc.php';
$link = db_connect();
$date = $_POST['date'];
$venue = $_POST['venue'];
$location = $_POST['location'];
$information = $_POST['information'];
$query = "INSERT INTO showdates VALUES ('','$date','$venue','$location','$information')";
db_query($query, $link);
db_close(null, $link);
$link = db_connect();
db_close($result, $link);
?>
<html>
<head>
<title>Show Updates</title>
<LINK REL="SHORTCUT ICON" HREF="../favicon.ico">
<link href="../admin/rustedshows.css" rel="stylesheet" type="text/css">
</head>
<body>
<center><img src="images/textbanner.gif" border=0></center>
<br><table border=0 width=55% bgcolor="#BEC9D4" cellpadding=0 cellspacing=0 align=center style="border:1px solid #000;">
<tr>
<td style="padding:12px;">Add New Shows
<form action="<?=$_SERVER['PHP_SELF']?>" method="post" name="Add New Shows">
<table>
<tr>
<td>Date:</td>
<td><input name="date" type="date" id="date"></td>
</tr>
<tr>
<td>Venue:</td>
<td><input name="venue" type="text" id="venue"></td>
</tr>
<tr>
<td>Location:</td>
<td><input name="location" type="text" id="location"></td>
</tr>
<tr>
<td>Information:</td>
<td><input name="information" type="text" id="information"></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input name="submit" type="submit" id="submit" value="Submit">
<input name="reset" type="reset" id="reset" value="Reset">
</div></td>
</tr>
</table>
</form>
<a href="../admin/?logout">Logout</a> | <a href="admin.php">Back to Main Page</a></td>
</tr>
</table>
<p><br><p><br><center>Design © Llora McGrath 2007</center>
</body>
</html>
<?php
include 'session.inc.php';
include 'config.inc.php';
include 'db.inc.php';
$link = db_connect();
$date = $_POST['date'];
$venue = $_POST['venue'];
$location = $_POST['location'];
$information = $_POST['information'];
$query = "INSERT INTO showdates VALUES ('','$date','$venue','$location','$information')";
db_query($query, $link);
db_close(null, $link);
$link = db_connect();
db_close($result, $link);
?>
<html>
<head>
<title>Show Updates</title>
<LINK REL="SHORTCUT ICON" HREF="../favicon.ico">
<link href="../admin/rustedshows.css" rel="stylesheet" type="text/css">
</head>
<body>
<center><img src="images/textbanner.gif" border=0></center>
<br><table border=0 width=55% bgcolor="#BEC9D4" cellpadding=0 cellspacing=0 align=center style="border:1px solid #000;">
<tr>
<td style="padding:12px;">Add New Shows
<form action="<?=$_SERVER['PHP_SELF']?>" method="post" name="Add New Shows">
<table>
<tr>
<td>Date:</td>
<td><input name="date" type="date" id="date"></td>
</tr>
<tr>
<td>Venue:</td>
<td><input name="venue" type="text" id="venue"></td>
</tr>
<tr>
<td>Location:</td>
<td><input name="location" type="text" id="location"></td>
</tr>
<tr>
<td>Information:</td>
<td><input name="information" type="text" id="information"></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input name="submit" type="submit" id="submit" value="Submit">
<input name="reset" type="reset" id="reset" value="Reset">
</div></td>
</tr>
</table>
</form>
<a href="../admin/?logout">Logout</a> | <a href="admin.php">Back to Main Page</a></td>
</tr>
</table>
<p><br><p><br><center>Design © Llora McGrath 2007</center>
</body>
</html>