如何重新加载原始webview

时间:2016-02-15 16:08:41

标签: webview

如果我将推送发送到我的webview应用程序中的特定链接,我该如何为人们创建一个动作来打击" home"重新加载我的主页,以便将它们发送回他们刚刚打开应用程序时要访问的页面。

1 个答案:

答案 0 :(得分:0)

假设您有一个按钮,然后执行以下操作:

 <?php if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] ==     "pic_form") &&(($_POST['check'])=== 1)) {
$id=$_POST['monitorimg'];
move_uploaded_file($_FILES['pic']['tmp_name'],"imageupload/".$id);
   $updateSQL = sprintf("UPDATE administrator SET pix=%s WHERE adminid=%s",
                  GetSQLValueString($_POST['monitorimg'], "text"),
                   GetSQLValueString($_POST['ids'], "int"));

    mysqli_select_db($myconn,$database_myconn);
   $Result1 = mysqli_query($myconn,$updateSQL) or    die(mysqli_connect_error());
} 
  ?>      


    <div class="box box-primary">
                    <div class="box-body box-profile">


           <img class="profile-user-img img-responsive img-circle"    width="68" height="68" src="imageupload/<?php echo $row_rslinks['adminid']; ?>".""                     alt="profile picture">
              <form action="<?php echo $editFormAction; ?>" name="pic_form" enctype="multipart/form-data" method="POST">
                   <input type="file" name="pic" class="btn-facebook" required>
                   <input type="submit" class="btn-dropbox" name="sub" id="sub" value="Upload">
                   <input type="hidden" name="ids" id="ids" value="<?php echo $row_rslinks['adminid'];?>">
                   <input type="hidden" name="monitorimg" id="monitorimg" value="<?php echo $row_rslinks['adminid'];?>">
                   <input type="hidden" name="MM_update" value="pic_form">
                  <input type="hidden" name="check" id="check" value="1">
              </form>

                        <h3 class="profile-username text-center"></h3>

                        <p class="text-muted text-center"></p>


  <!-----------This is the second Table code--------------> 


 <?php  if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1") &&(($_POST['check'])=== 1)) {
  $updateSQL = sprintf("UPDATE administrator SET password=%s, adminname=%s, email_id=%s, contactno=%s WHERE adminid=%s",
                   GetSQLValueString($_POST['pwd'], "text"),
                   GetSQLValueString($_POST['inputName'], "text"),
                   GetSQLValueString($_POST['inputEmail'], "text"),
                   GetSQLValueString($_POST['num'], "text"),
                   GetSQLValueString($_POST['stuid'], "int"));

   mysql_select_db($database_myconn, $myconn);
   $Result1 = mysql_query($updateSQL, $myconn) or die(mysql_error());
    }

  ?>
    <div class="tab-content">
                    <div class="active tab-pane" id="settings">
                    <form action=<?php echo $editFormAction; ?>"" name=form11" method=POSTT" enctype="application/x-www-form-urlencoded" class="form-horizontal" id="form1">
                    <div class="form-group" id="stuid">
                      <label for="stuid" class="col-sm-2 control-label">User ID</label>
                      <div class="col-sm-10">
                        <input name="stuid" type="text" class="form-control"  id="stuid"
                                               value="<?php echo $row_rslinks['adminid']; ?>" readonly>
                      </div>
                    </div>
                    <div class="form-group" id="inputeName">
                      <label for="inputName" class="col-sm-2 control-label">Name</label>
                      <div class="col-sm-10">
                        <input type="text" class="form-control" name="inputName" id="inputName"
                                               value="<?php echo $row_rslinks['adminname']; ?>">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="inputEmail" class="col-sm-2 control-label" >Email</label>
                      <div class="col-sm-10">
                        <input type="email" class="form-control" name="inputEmail" id="inputEmail" 
                                               value="<?php echo $row_rslinks['email_id']; ?>">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="pwd" class="col-sm-2 control-label">Password</label>
                      <div class="col-sm-10">
                        <input type="password" class="form-control" id="pwd" name="pwd" value="">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="rpwd" class="col-sm-2 control-label">Re-Password</label>
                      <div class="col-sm-10">
                        <input type="password" class="form-control" id="rpwd" name="rpwd" value="">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="num" class="col-sm-2 control-label">Mobile</label>
                      <div class="col-sm-10">
                        <input type="text" class="form-control" id="num" name="num" value="<?php echo $row_rslinks['contactno']; ?>">
                      </div>
                    </div><input type="hidden" name="check" id="check" value="2">

                    <div class="form-group">
                      <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-primary">Save</button>
                      </div>
                    </div>

或者您可以在片段中使用WebView,并更改片段。