General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 27th, 2003, 08:29 AM
Snowfruit Snowfruit is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Ireland
Posts: 11 Snowfruit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Input form woes

I hope some one can help me with this problem...

I am running a database of holiday properties on a large web site. Which all works perfectly. Now to facilitate the entry of data into the database I also set up an input form, which is where the problems occur.
The form works perfectly if you're only entering 4 or less records one after the other - form works good, all data ends up in the database where its meant to be. However it stops working completely when you try to enter the 5th, the form displays and allows you to fill it all out but when you submit the the next page doesn't display (it just shows blank) and the data has not been added to the database..... If you switch your browser off and restart it works again..... Any one have any ideas as to what may be causing this problem?

Reply With Quote
  #2  
Old March 3rd, 2003, 04:43 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Would it be possible to paste the code you're using? It would give us a better idea...
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
  #3  
Old March 4th, 2003, 03:54 AM
Snowfruit Snowfruit is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Ireland
Posts: 11 Snowfruit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Post

Right , the code is as follows:
PHP Code:
<?
if(isset($add)){
    if(
$town == ""){ $msg 'You forgot to enter the Town.'; exit; }
    if(
$county == ""){ $msg 'You forgot to enter the County.'; exit; }
    if(
$email == ""){ $msg 'You forgot to enter the Email.'; exit; }
    if(
$feat == "true" && $det_long == ""){ $msg 'You forgot to enter the Long Description.'; exit; }
    if(
$det_short == ""){ $msg 'You forgot to enter the Short Description.<br>'; exit; }
    if((
$feat == "true") && ($tb == "")){ $msg 'You forgot to select a Thumbnail.'; exit; }
    if((
$feat == "true") && ($pic == "")){ $msg 'You forgot to select a Picture.'; exit; }
    if((
$feat == "false") && ($url == "")){ $msg 'You forgot to enter a URL.'; exit; }
    
$conn mysql_connect("localhost","ireland","route66") or die("Unable to connect to database");
    
$db mysql_select_db("ireland") or die("Unable to select database ireland");
    
$query "insert into `data` ( `prop` , `address` , `town` , `county` , `tel` , `fax` , `email` , `url` , `det_long` , `det_short` , `tb` , `pic` , `hi_sing` , `hi_pps` , `lo_pps` , `lo_sing` , `rural` , `feat` , `name` , `type` )
    values ('"
.$prop."', '".$address."', '".$town."', '".$county."', '".$tel."' , '".$fax."' , '".$email."', '".$url."', '".$det_long."', '".$det_short."', '".$tb."', '".$pic."', '".$hi_sing."', '".$hi_pps."', '".$lo_pps."', '".$lo_sing."', '".$rural."', '".$feat."', '".$name."', '".$type."')";
    
$result mysql_query($query);
    if(
$result$msg 'Record number '.mysql_insert_id().' was written to the database.<br>';
    
mysql_close();
}

?>

It seems to allow you to enter about 4 records and then just stops..........

Reply With Quote
  #4  
Old March 4th, 2003, 10:56 AM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Snowfruit,

Not sure what you mean by "4 records at a time"...

Do you allow the user to enter 4 items on a single form, or do you mean 4 separate inserts?

Reply With Quote
  #5  
Old March 4th, 2003, 11:27 AM
Snowfruit Snowfruit is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Ireland
Posts: 11 Snowfruit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
4 consequetive inserts

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Input form woes


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT