简体   繁体   中英

how to stop refreshing page in php

if(isset($_POST["subSubmit"])){
 if($_POST["subSubmit"]=="Send") {
  $sentto    = $_POST['txtSentto'];
  $sentcc    = $_POST['txtcc'];
 $sel="insert into newmessage set sendto='".$sentto."', 
                  sentcc='".$sentcc."'";
 $selqur=mysql_query($sel) or die("Error (" . mysql_errno() .")" . mysql_error());
 }
}

i am php beginner i dont know how to stop the reload page.For the above program not reload without submit button once submit button clicked data stored in database and then click refreshing the page the data automatically send to database.Plz give any ideas thank you

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM