omg help...insane simple query won't work I must be blind

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ok guys, I'm going blind indeed, this is a simple tiny query that goes to a
form and I get the error : Error, insert query failed
ever since I added the fields StartDate and EndDate and advertiser .... what
is going on....
here is the php
<?php
$ebits = ini_get('error_reporting');
error_reporting($ebits ^ E_NOTICE);
//connect to database
include 'inc/dbconnOpen.php';

//start script
if(isset($_POST['add']))
{

 $href = $_POST['href'];
 $title = $_POST['title'];
 $blurb = $_POST['blurb'];
 $StartDate = $_POST['byear'] ."-". $_POST['bmonth'] ."-". $_POST['bday'];
  $EndDate = $_POST['eyear'] ."-". $_POST['emonth'] ."-". $_POST['eday'];
  $expos = $_POST['expos'];
 $advertiser = $_POST['advertiser'];

 $query = "INSERT INTO `textads`
(`title`, `href`, `blurb`, `StartDate`, `EndDate`, `expos`, `advertiser`)
VALUES
('".$title."', '".$href."', '".$blurb."', '".$StartDate."', '".$EndDate."',
'".$expos."', '".$advertiser."' )";
 echo $query;
 mysql_query($query) or die(mysql_error());

 //handy variable view
include ("VariableReveal2.php");  it's not showing anything either...

 echo "New Dream Job Text Ad  added <br> <a href='enterForm2.php'>Add New
Ad</a>";

}
else
{
?>

And yes yes I know escape my strings ...I'll go back and do that when the
stupid insert is actually working...


Thanks
Terion

Happy Freecycling
Free the List !!
www.freecycle.org
Over Moderation of Freecycle List Prevents Post Timeliness.
------------------------------------------------
Twitter?
http://twitter.com/terionmiller
------------------------------------------------
Facebook:
<a href="http://www.facebook.com/people/Terion-Miller/1542024891";
title="Terion Miller's Facebook profile" target=_TOP><img src="
http://badge.facebook.com/badge/1542024891.237.919247960.png"; border=0
alt="Terion Miller's Facebook profile"></a>
Laurence J. Peter  - "If two wrongs don't make a right, try three."

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux