473,395 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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.

Jul 17 '05 #1
4 2268
On Tue, 16 Mar 2004 13:36:57 -0600, John <askformyemail> wrote:
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.


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

--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
<http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space>
Jul 17 '05 #2
Uzytkownik "John" <askformyemail> napisal w wiadomosci
news:Xn******************@216.196.97.136...
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.


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.
Jul 17 '05 #3
John wrote:
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.


Dear John, ... :)

give us <form> and query for include data in db
--
kreso
http://www.plus.hr/cgi-bin/aff/g.o/gdprom
www.gdprom.com

Jul 17 '05 #4
"Kreso" <kr***@purger.com> wrote in news:c39gsj$2661pd$1@ID-
208070.news.uni-berlin.de:
John wrote:
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.
Dear John, ... :)

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


Ok, here is form from first page:

<form method="post" action="page2.php">
Fields Marked with an <font color="#FF0000">*</font> are
mandatory
<table width="600" border=0 cellpadding=4 cellspacing=0>
<tr>
<td bgcolor="#EAECF4"><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="#EAECF4" ><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="#EAECF4"><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="#EAECF4"><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="#EAECF4"><div align="center"><b>Country/Region
</b></div></td>
<td><select name="country" class="scroll_11">
<bunch of countries, i deleted to save space>
</select> </td>
</tr>
<tr>
<td bgcolor="#EAECF4"><div align="center"><b>Company Name
</b></div></td>
<td><input type="text" name="CompanyName" size=25> </td>
</tr>
<tr>
<td bgcolor="#EAECF4"><div align="center"><b>Tel</b></div>
</td>
<td><input type="text" name="Tel" size=25> </td>
</tr>
<tr>
<td bgcolor="#EAECF4"><div align="center"><b>Fax</b></div>
</td>
<td><input type="text" name="Fax" size=25> </td>
</tr>
<tr>
<td bgcolor="#EAECF4"><div align="center"><b>Mailing Add.
</b></div></td>
<td><input type="text" name="MailingAdd" size=50 </td>

</tr>
<tr>
<td bgcolor="#EAECF4"><div align="center"><b>City</b></div>
</td>
<td><input type="text" name="City" size=25> </td>
</tr>
<tr>
<td bgcolor="#EAECF4"><div align="center"><b>Keywords</b>
</div></td>
<td><input type="text" name="Keywords" size=25> </td>
</tr>
<tr>
<td bgcolor="#EAECF4"><div align="center"><b>Description</b>
</div></td>
<td> <textarea name="Description" 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><font color="#005896">Terms of
Agreement </font>:</strong></font></td>
<td valign="top" class="formtext2"> <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><div 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.company_id ORDER BY contact.company_id DESC
LIMIT 10;";

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

while ($row = mysql_fetch_assoc($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... :|
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ruben | last post by:
Hello. I am trying to read a small text file using the readline statement. I can only read the first 2 records from the file. It stops at the blank lines or at lines with only spaces. I have a...
3
by: feel_free_to_spam_me | last post by:
Hi. I'm a sorta novice ASP programmer, so I sure could use some help from of you more experienced gurus.... I've written an ASP page that pulls all records from a table. My query is 'SELECT *...
19
by: Joe Scully | last post by:
Hi all, I am having trouble with access adding a blank record to a subform everytime I finish entering data and closing the form. (The form and subform are based on the one table) When...
1
by: Peter Kleiner | last post by:
Greetings all, I have a database with two tables: docs and edocs. For each record in docs there can be zero to unlimited records in edocs. Both tables have an integer primary key named index. ...
6
by: Melissa | last post by:
Does anyone have a generic procedure for adding blank lines to reports like Sales details, PO details and/or Orders details. The procedure would need to count the number of line items, determine...
1
by: Tim Graichen | last post by:
I have FrmMain that has one subform (SbForm). FrmMain is filled with records from Tbl1. SbForm is filled with records from Tbl2 based on the current selected record in FrmMain from Tbl1. ...
5
by: ChadDiesel | last post by:
My basic question is why does my print report button on my subform print a blank report when my cursor is on a blank entry line? Here is a more detailed explanation of my problem. I have a...
10
by: lorirobn | last post by:
Hi, I have a form with several combo boxes, continuous form format, with record source a query off an Item Table. The fields are Category, Subcategory, and Color. I am displaying descriptions,...
4
by: sparks | last post by:
I am trying to fix a database that someone did about 4 yrs ago in access97. The main table just contains demographics and is on the main form of the database. It has a subform on a tab that...
2
by: propoflady | last post by:
When I do the following union query - it works but it gives me blank records then my list SELECT , FROM BuyerListName UNION SELECT , FROM Buyers ORDER BY ;
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.