Thanks for your help guys.  The checkboxes thing is working great.

Michael, regarding using files instead of a database, in your opinion,
eventually having a 10-20 MB text file isn't going to cause any server
problems if more than a few people are accessing the site at a time? 
I'm not talking millions, or even thousands of users, more like a few
hundred a day.  If using files should not be a problem, I would much
rather use that method in this particular project.

Thanks again,
Jason

On Fri, 2003-07-11 at 21:27, Michael Smith wrote:
> Jason Giangrande wrote:
> > First question: I'm creating a custom content manager for a small site. 
> > It will basically be used to store short articles (several paragraphs
> > each).  Now my question is, is storing these to a text file going to
> > work or am I going to have problems later on when the file gets to be a
> > reasonable size.  I ask this, because the only way I can seem to work
> > with the text file is to read the entire file in and alter it that way. 
> > Are there any ways to edit or remove one line of a text file without
> > having to read the entire file first?  Would I be better off using a
> > database instead of a text file (keep in mind that I know nothing about
> > databases)?
> > 
> 
> Flat files are perfectly fine. If you include them with PHP there is 
> almost no performance hit. However, you could use file() to put them in 
> an array and then array_search to figure out which key and only use that ...
> 
> > Question two: I've read in several books that html checkbox forms can
> > pass multiple values to the server when more than one check box is
> > selected if they have the same name.  However, when I var_dump the
> > $_POST variable that should contain them I only get one value.  Anyone
> > have any ideas why?
> 
> the name attribute for the checkboxes needs to be name="somevar[]" to be 
> put in an array.
> 
> > 
> 
> 
> > Regards,
> > Jason Giangrande
> > 
> 
> Cheers,
> -Michael
> 
> > 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to