[thelist] help with project design
Terion Miller
webdev.terion at gmail.com
Tue Nov 25 16:09:32 CST 2008
Oh thank you, now step 1 down...can you explain why that one worked as
opposed to the others, I'm trying to learn this stuff but everything is so
greek to me...or maybe that should be geek to me lol
On Tue, Nov 25, 2008 at 4:02 PM, Abdullah Mancy <mancy3000 at gmail.com> wrote:
> this would really work =)
>
>
>
> <?php
> if(isset($_POST['add']))
> {
> include 'inc/dbconnOpen.php';
> $HREF = $_POST['HREF'];
> $TITLE = $_POST['TITLE'];
> $BLURB = $_POST['BLURB'];
>
> $query = "INSERT INTO `textads` (`title`, `href`, `blurb`) VALUES
> ('$TITLE', '$HREF', '$BLURB')";
> echo $query;
> mysql_query($query) or die('Error, friggin insert query failed');
> echo "New Dream Job Text Ad added";
> }
> else
> {
> ?>
> <form action="" method="post">
> <table width="400" border="0" cellspacing="1" cellpadding="2">
> <tr>
> <td width="100">TITLE</td>
> <td><input name="TITLE" type="text" id="title"></td>
> </tr>
> <tr>
> <td width="100">Blurb</td>
> <td><input name="BLURB" type="text" id="blurb"></td>
> </tr>
> <tr>
> <td width="100">LINK</td>
> <td><input name="HREF" type="text" id="href"></td>
> </tr>
>
>
> <tr>
> <td width="100"> </td>
> <td><input name="add" type="submit" id="add" value="Add AD"></td>
> </tr>
> </table>
> </form>
> <?php
> }
> ?>
> </body>
> </html>
>
>
> On Tue, Nov 25, 2008 at 11:58 PM, Terion Miller <webdev.terion at gmail.com
> >wrote:
>
> > Nope still get a blank page with that...
> >
> >
> > On Tue, Nov 25, 2008 at 3:52 PM, Abdullah Mancy <mancy3000 at gmail.com>
> > wrote:
> >
> > > here is correction to my code i was missing column value into the
> insert
> > > query
> > >
> > > <?
> > > $items = array('HREF'=>'link',' TITLE'=>'title','
> > > BLURB'=>'text','BDATE'=>'beginning date','EDATE'=>'end
> > date','EXPOS'=>'');
> > > foreach($items as $item => $message)
> > > {
> > > if(isset($_POST[$item]))
> > > {
> > > $$item = $_POST[$item];
> > > }
> > > else
> > > {
> > > $$item = "";
> > > $errormsg = "Please Select " . $message . " for the AD.";
> > > }
> > > }
> > > mysql_select_db($mysql);
> > >
> > > $sql = "INSERT INTO textads (HREF, TITLE, BLURB,BDATE,EDATE,EXPOS)
> VALUES
> > > ('$HREF','$TITLE', '$BLURB', '$BDATE', '$EDATE', '$EXPOS')";
> > > mysql_query($sql) or die('Error, insert query failed');
> > >
> > > ?>
> > >
> > >
> > >
> > >
> > > On Tue, Nov 25, 2008 at 11:49 PM, Abdullah Mancy <mancy3000 at gmail.com
> > > >wrote:
> > >
> > > > oh sorrychange $query line to
> > > >
> > > > $query = "INSERT INTO `textads` (HREF, BLURB, TITLE) VALUES
> > > > ('$HREF','$TITLE','$BLURB')";
> > > >
> > > >
> > > > On Tue, Nov 25, 2008 at 11:48 PM, Abdullah Mancy <
> mancy3000 at gmail.com
> > > >wrote:
> > > >
> > > >> change $query line to
> > > >>
> > > >> $query = "INSERT INTO 'textads' ('HREF', 'BLURB', 'TITLE') VALUES
> > > >> ('$HREF','$TITLE','$BLURB')";
> > > >>
> > > >>
> > > >
> > > --
> > >
> > > * * Please support the community that supports you. * *
> > > http://evolt.org/help_support_evolt/
> > >
> > > For unsubscribe and other options, including the Tip Harvester
> > > and archives of thelist go to: http://lists.evolt.org
> > > Workers of the Web, evolt !
> > >
> > --
> >
> > * * Please support the community that supports you. * *
> > http://evolt.org/help_support_evolt/
> >
> > For unsubscribe and other options, including the Tip Harvester
> > and archives of thelist go to: http://lists.evolt.org
> > Workers of the Web, evolt !
> >
> --
>
> * * Please support the community that supports you. * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>
More information about the thelist
mailing list