Re: Limiting the insert operation

From: Date: Fri, 29 Sep 2000 15:25:30 +0000
Subject: Re: Limiting the insert operation
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-18057@lists.php.net to get a copy of this message
Hiya use :
        function Html_Script_Submit_Once ($msg = "data allready send") { ?>
                <SCRIPT>
                        submitted = 0;
                        function Check_Submit() {
                                if (submitted == 0) {
                                        submitted = 1;
                                        return true;
                                }
                                alert("<?=$msg?>");
                                return false;
                        }
                </SCRIPT>
        <? }
and put in you form onSubmit="Check_Submit"; people will get a messy when the submit more the once Greetz, Wico At 07:36 29-9-00 -0700, David Tod Sigafoos wrote:
Hello manohar, If it is possible that the user is 'updating' not just inserting (creating a new) then I would suggest a 'dtap' stamp (date/time/application). This would allow the user to create a new, modify existing. You would do a select on the date/time and see if it is within xminutes/seconds then don't allow DSig David Tod Sigafoos Friday, September 29, 2000, 4:01:27 PM, you wrote: ms> Hi all, ms> I am executing an insert operation into Mysql thro' a form. How can i ms> control the operation such that the insert is executed only once?(If the ms> user clicks the submit many times, multiple inserts should not occur). ms> Please help. ms> cheers, ms> mano ms> _________________________________________________________________________ ms> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. ms> Share information about yourself, create your own public profile at ms> http://profiles.msn.com. -- Best regards,
 David                            mailto:dsig@teleport.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.general (#18057) next »