blank records?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    blank records?

    Anyone know why blank records would be input into the database from a form?
    Everytime I click submit I get 3 entries at a time entered in for no reason
    on top of the original data.

  • Andy Hassall

    #2
    Re: blank records?

    On Tue, 16 Mar 2004 13:36:57 -0600, John <askformyemai l> wrote:
    [color=blue]
    >Anyone know why blank records would be input into the database from a form?
    >Everytime I click submit I get 3 entries at a time entered in for no reason
    >on top of the original data.[/color]

    The crystal ball says: You have a bug in your code. It won't be happening for
    'no reason'.

    --
    Andy Hassall <andy@andyh.co. uk> / Space: disk usage analysis tool
    <http://www.andyh.co.uk > / <http://www.andyhsoftwa re.co.uk/space>

    Comment

    • Chung Leong

      #3
      Re: blank records?

      Uzytkownik "John" <askformyemai l> napisal w wiadomosci
      news:Xns94AE94A 47DCF8nada@216. 196.97.136...[color=blue]
      > Anyone know why blank records would be input into the database from a[/color]
      form?[color=blue]
      > Everytime I click submit I get 3 entries at a time entered in for no[/color]
      reason[color=blue]
      > on top of the original data.[/color]

      Your spaceship trapped in a temporal loop, caused by a rupture in the
      space-time continuum from a imminent collision with another spaceship in the
      near relative future. The number 3 is sent by your computer from the
      previous loop, telling you that you need to decompress the shuttle-bay
      instead of using the tracker beam.


      Comment

      • Kreso

        #4
        Re: blank records?

        John wrote:[color=blue]
        > Anyone know why blank records would be input into the database from a
        > form? Everytime I click submit I get 3 entries at a time entered in
        > for no reason on top of the original data.[/color]

        Dear John, ... :)

        give us <form> and query for include data in db


        --
        kreso

        Palm OS games and Palm OS software, Web design, PHP, MySQL, hosting




        Comment

        • John

          #5
          Re: blank records?

          "Kreso" <kreso@purger.c om> wrote in news:c39gsj$266 1pd$1@ID-
          208070.news.uni-berlin.de:
          [color=blue]
          > John wrote:[color=green]
          >> Anyone know why blank records would be input into the database from a
          >> form? Everytime I click submit I get 3 entries at a time entered in
          >> for no reason on top of the original data.[/color]
          >
          > Dear John, ... :)
          >
          > give us <form> and query for include data in db
          >[/color]

          Ok, here is form from first page:

          <form method="post" action="page2.p hp">
          Fields Marked with an <font color="#FF0000" >*</font> are
          mandatory
          <table width="600" border=0 cellpadding=4 cellspacing=0>
          <tr>
          <td bgcolor="#EAECF 4"><div align="center"> <b>Subject</b>
          </div></td>
          <td><input type="text" name="Subject" size=25> <font
          color="#FF0000" >*
          (Only English)</font></td>
          </tr>
          <tr>
          <td height="33" align="top" bgcolor="#EAECF 4" ><div
          align="center"> <b>Industry</b></div></td>
          <td><bunch of options i deleted to save space>
          </select> <font color="#FF0000" >*</font> </td>
          </tr>
          <tr>
          <td bgcolor="#EAECF 4"><div align="center"> <b>Your Name</b>
          </div></td>
          <td><input type="text" name="Name" size=25> <font
          color="#FF0000" >*</font>
          </td>
          </tr>
          <tr>
          <td bgcolor="#EAECF 4"><div align="center"> <b>Email</b></div>
          </td>
          <td><input type="text" name="Email" size=25> <font
          color="#FF0000" >*</font>
          </td>
          </tr>
          <tr>
          <td bgcolor="#EAECF 4"><div align="center"> <b>Country/Region
          </b></div></td>
          <td><select name="country" class="scroll_1 1">
          <bunch of countries, i deleted to save space>
          </select> </td>
          </tr>
          <tr>
          <td bgcolor="#EAECF 4"><div align="center"> <b>Company Name
          </b></div></td>
          <td><input type="text" name="CompanyNa me" size=25> </td>
          </tr>
          <tr>
          <td bgcolor="#EAECF 4"><div align="center"> <b>Tel</b></div>
          </td>
          <td><input type="text" name="Tel" size=25> </td>
          </tr>
          <tr>
          <td bgcolor="#EAECF 4"><div align="center"> <b>Fax</b></div>
          </td>
          <td><input type="text" name="Fax" size=25> </td>
          </tr>
          <tr>
          <td bgcolor="#EAECF 4"><div align="center"> <b>Mailing Add.
          </b></div></td>
          <td><input type="text" name="MailingAd d" size=50[color=blue]
          > </td>[/color]
          </tr>
          <tr>
          <td bgcolor="#EAECF 4"><div align="center"> <b>City</b></div>
          </td>
          <td><input type="text" name="City" size=25> </td>
          </tr>
          <tr>
          <td bgcolor="#EAECF 4"><div align="center"> <b>Keywords</b>
          </div></td>
          <td><input type="text" name="Keywords" size=25> </td>
          </tr>
          <tr>
          <td bgcolor="#EAECF 4"><div align="center"> <b>Descriptio n</b>
          </div></td>
          <td> <textarea name="Descripti on" rows=8 cols=40
          wrap=physical></textarea>
          <font color="#FF0000" >*</font></td>
          </tr>
          <tr>
          <td align="right" valign="top" class="text12"> <font color="#
          666666"><span class="text12"> <font color="#FF0000" >*
          </font></span><strong><f ont color="#005896" >Terms of
          Agreement </font>:</strong></font></td>
          <td valign="top" class="formtext 2"> <table width="100%"
          border="0" cellspacing="0" cellpadding="0" >
          <tr valign="top">
          <td width="2%"> <input type="checkbox" name="terms"
          value="1">
          </td>
          <td width="98%" class="text11-blue"> <font
          color="black">< strong>
          Yes, I have read and now accept the
          Terms of Agreement. </strong></font> </td>
          </tr>
          <tr>
          <textarea name="comments" readonly rows="4" cols="50">
          TERMS OF AGREEMENT

          </textarea>
          </tr>
          </table></td>
          </tr>
          <tr>
          <td colspan=4 align=right><di v align="center">
          <input name="submit" type="submit" value="Finish">
          <input name="reset" type="reset" value="Reset">
          </div></td>
          </tr>
          </table>
          </form>



          Here is the query on 2nd page:

          $select = "SELECT * FROM company,contact WHERE
          contact.company _id=company.com pany_id ORDER BY contact.company _id DESC
          LIMIT 10;";

          $result = mysql_query($se lect)or die("Invalid query: " . mysql_error());

          while ($row = mysql_fetch_ass oc($result)) {

          print '<b>'.$row['Subject'].'</b>'.'<br>';
          print $row['category'].'<br><br>';
          print $row['last_name'].' - ';
          print $row['email'].'<br><br>';
          print $row['intro'].'<br><br>';


          and that's it... I don't see how I'm getting the problem... :|

          Comment

          Working...