You are here: Re: LONGBLOB, Textarea question. Can't seem to post more than a few thousand lines.... « All PHP « IT news, forums, messages
Re: LONGBLOB, Textarea question. Can't seem to post more than a few thousand lines....

Posted by Mike Youell on 04/09/06 23:47

1) I would limit it with javascript (note some people forget to test
for paste when implementing this).

2) But also limit the max size allowed server side with PHP aswell
(although I rarely bother with javascript as not everyone has it
enabled in their web browser and also people are used to having the
form re-displayed with errors to tell them where they went wrong
filling in the form).

e.g.

if (count($_POST['code']) > MAX_CODE_SIZE)
{
// Give feedback to the user that the code size is too large, and
display the form again.
// You could either make the textarea background red as feedback or
put a message at the top of the form which is highly visible. But
that's up to you :o)
}
else
{
// Put the code into the database.
}

Let me know if you have any problems,
Cheers,
Mike Youell.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация