You are here: Re: Avoiding double-submissions with mail script « PHP Programming Language « IT news, forums, messages
Re: Avoiding double-submissions with mail script

Posted by william.clarke@gmail.com on 02/03/06 00:11

I've used something along the lines of:

//I'll assume you know how to start a session, if not check the
manual.
//Call it whatever you like....it is just a flag to stop the message
getting resent.
$_SESSION("Message_Sent") = true;

Then before mailing, check the value of this session variable.

You could also uses Javascript to disable the button (but this can get
fiddly if the user hits refresh, but using PHP to generate the
javascript code means you can check the same Session variable and keep
the button disabled if it's value is true.).

 

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

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