I'm trying to all users to add data to a database. However, it's not working and I'm not getting an error. This is purely for practice, but it's still frustrating. Thoughts?
<form name="Add" id="Add" method="post" action="programadd.php">
<p>Content Name:
<input name="program" type="text" id="program" style="width: 500px; height: 20px;" />
</p>
<p>Content Air Date
<input name="airdate" type="date" id="airdate" />
</p>
<p>Description
<input name="description" type="text" id="description" style="width: 500px; height: 20px;" />
</p>
<p>Production
<input name="production" type="text" id="production" value="nothing" style="width: 500px; height: 20px;" />
</p>
<p>Promotions
<input name="promotion" type="text" id="promotion" value="nothing" style="width: 500px; height: 20px;" />
</p>
<p>Community
<input name="community" type="text" id="community" value="nothing" style="width: 500px; height: 20px;" />
</p>
<p>Web
<input name="web" type="text" id="web" value="nothing" style="width: 500px; height: 20px;" />
</p>
<p>
<input type="submit" name="Submit" value="Submit" />
</p>
</form>
Here's the programadd page. Thanks!
<?php
include('connect-db.php');
$program = $_POST['program'];
$airdate = $_POST['airdate'];
$description = $_POST['description'];
$production = $_POST['production'];
$promotion = $_POST['promotion'];
$community = $_POST['community'];
$web = $_POST['web'];
if (mysql_query ("INSERT INTO calendar(program, airdate, description, production, promotion, community, web) VALUES
('$program', '$airdate', '$description','$production', '$promotion', '$community', '$web')"))
{ echo "Content successfully added to the database. <br />
}
else {
die(mysql_error());
}
require_once("db_connx_close.php");
?>