[thelist] help with project design

Terion Miller webdev.terion at gmail.com
Tue Nov 25 14:17:53 CST 2008


I have to make a form to add text ads to a db then have those ads display in
a table with 3 columns 1 ad per column and this little application has to
work inside the Helios adserver, I'm stuck because at this point I can't
even get my form working on my local server...

all the code I have written thus far:

<?php include("inc/dbConnOpen.php") ;   /* connect */

if (isset($_POST['HREF'])){$HREF = $_POST['HREF'];} else {$HREF = "";}
    {$errmsg = 'Please Select a LINK FOR THE AD';}
if (isset($_POST['TITLE'])){$TITLE = $_POST['TITLE'];} else {$TITLE = "";}
{$errmsg = 'Please Select a TITLE FOR THE AD';}
if (isset($_POST['BLURB'])){$BLURB = $_POST['BLURB'];} else {$BLURB = "";}
{$errmsg = 'Please enter the text for the ad';}
if (isset($_POST['BDATE'])){$BDATE = $_POST['BDATE'];} else {$BDATE = "";}
{$errmsg = 'Please enter the beginning date for the ad';}
if (isset($_POST['EDATE'])){$EDATE = $_POST['EDATE'];} else {$EDATE = "";}
{$errmsg = 'Please enter the end date for the ad';}

mysql_select_db($mysql);
$sql = "INSERT INTO textads (HREF, TITLE, BLURB,BDATE,EDATE,EXPOS) VALUES
('HREF',' BLURB', 'BDATE', 'EDATE', 'EXPOS')";
mysql_query($sql) or die('Error, insert query failed');
?>



More information about the thelist mailing list