When ever i post in my forum it display the message two/more times. Pls how to stop this?
How to stop this
Collapse
X
-
Its basically ur network. Add key to ur form, and reset it after a post. Simple.
Added after 9 minutes:
PHP Code:// form example
<?php
$_key = $_SESSION['key'] = substr(md5(uniqid(rand(), TRUE)), 0, 12);
echo '<input type="hidden" name="key" value="'.$_key.'" />', "\n";
// validation example
<?php
if( ! empty($_POST['key']) AND $_POST['key'] === $_SESSION['key']){
// post message
// reset key
$_SESSION['key'] = md5(uniqid(rand(), TRUE));
}Last edited by CreativityKills; 04.03.11, 07:41.
Comment
Comment