[thelist] I need php help again

Terion Miller webdev.terion at gmail.com
Wed Nov 26 09:52:27 CST 2008


Actually it was an overlooked field it was still trying to insert to, I
found it...
what a wonder the  mysql_error(); is..go figure
and my skill level is nil...
I got put in this job by default...
because the company was too cheap to hire a real programmer LOL

On Wed, Nov 26, 2008 at 9:48 AM, bruce <bedouglas at earthlink.net> wrote:

> Hi Terion,
>
> not sure of your skill level.. so don't take offense!!
>
> When trying to debug, go ahead and print/display the actual mysql query
> you're trying to implement. also, it'a good idea to display the mysql err
> that's being thrown when the quey isn't working.
>
> i'm going to guess that there might be a value in one of your vals that
> isn't set correctly.
>
> let us know your progress..
>
>
>
> -----Original Message-----
> From: thelist-bounces at lists.evolt.org
> [mailto:thelist-bounces at lists.evolt.org]On Behalf Of Terion Miller
> Sent: Wednesday, November 26, 2008 7:42 AM
> To: thelist at lists.evolt.org
> Subject: [thelist] I need php help again
>
>
> Ok, what could cause this...script worked fine when I left the office
> yesterday and now this morning it is back to Not inserting? This seems to
> be
> happening to me the whole 3 weeks I got suckered into doing this job:
> Here's the script:
>
> <?php
> if(isset($_POST['add']))
> {
>  include 'inc/dbconnOpen.php';
>  $href = $_POST['href'];
>  $title = $_POST['title'];
>  $blurb = $_POST['blurb'];
>  $bmonth = $_POST['bmonth'];
>  $bday = $_POST['bday'];
>  $byear = $_POST['byear'];
>  $emonth = $_POST['emonth'];
>  $eday = $_POST['eday'];
>  $eyear = $_POST['eyear'];
>  $expos = $_POST['expos'];
>
>  $query = "INSERT INTO `textads`  (`title`, `href`, `blurb`, `bmonth`,
> `bday`, `byear`, `emonth`, `eday`, `eyear`, `expos`) VALUES
> ('$title', '$href', '$blurb', '$bDate', '$eDate', '$expos', '$bmonth',
> '$bday', '$byear', '$emonth', '$eday', '$eyear')";
> /*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">Beginning Date</td>
> <td>
> <table>
> <td>Month:<input name="bmonth" type="text"
> id="bmonth"></td><td>Day:<input name="bday" type="text"
> id="bday"></td><td>Year:<input name="byear" type="text"
> id="byear"></td></table></td>
> </tr>
> <tr>
> <td width="100">Ending Date</td>
> <td>
> <table>
> <td>Month<input name="emonth" type="text" id="emonth"></td><td>Day:
> <input name="eday" type="text" id="eday"></td><td>Year:<input
> name="eyear" type="text" id="eyear"></td></table></td>
> </tr>
> <tr>
> <td width="100">Exposures Purchased</td>
> <td><input name="expos" type="text" id="expos"></td>
> </tr>
> <tr>
> <td width="100">&nbsp;</td>
> <td><input name="add" type="submit" id="add" value="Add AD"><input
> type="reset"></td>
> </tr>
> </table>
> </form>
> <?php
> }
> ?>
> </body>
> </html>
> --
>
> * * 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