By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,670 Members | 1,554 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,670 IT Pros & Developers. It's quick & easy.

blank records?

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
"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 discussion thread is closed

Replies have been disabled for this discussion.