Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

prevent resubmission of form

$
0
0
PHP Code:


                $site_title
=$_POST['sitetitle'];
        
$site_slogan=$_POST['siteslogan'];
        
$site_address=$_POST['siteaddress'];
        
                if (empty(
$site_title) && empty($site_address) ){
        echo 
"Site Title or Site Address Can't be Empty";
        
$set_key=0;
        }
        else{
        
$set_key=1;        }
        
// Inserting this information in Database
        
        
$query_setting="INSERT INTO settings ".
        
"(site_title,site_tagline,site_address) ".
        
"VALUES ('$site_title','$site_slogan','$site_address')";
        
        
// if all the things works fine then query will execute.
               
                
if ($set_key==1){
        
$set_query=mysql_query($query_setting);
        echo 
"Settings Saved";
        echo 
"<br>";
        echo 
"Press Finish";
        echo 
"";
        }
        else{

        } 

all the thing works fine but i want
when page refresh it destroy the past values please help me to avoid resubmission using refresh.

Viewing all articles
Browse latest Browse all 13329

Trending Articles