Posting to Database with PHP -


i'm trying users add data database. however, it's not working , i'm not getting error. purely practice, 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 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 calendar(program, airdate, description, production, promotion, community, web) values      ('$program', '$airdate', '$description','$production', '$promotion', '$community', '$web')")) { echo "content added database. <br />   } else {     die(mysql_error()); }     require_once("db_connx_close.php"); ?> 

{ echo "content added database. <br />                                                            ^---missing " here  

if you're not getting syntax error this, you're running display_errors , error_reporting turned off. never have them disabled when you're developing. it's coding equivalent of stuffing fingers in ears , going "lalalala can't hear don't care have tell me lalala".


Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -