我的代码有问题(xampp一切都好,但在服务器上没有!!!):当我返回“registtab.php”时,表格没有更新:
谢谢
<?php
if(!session_id()) {@session_start();}
require_once('x_mycode.php');
if(isset($_POST['call_New_Regist'])){xcall_New_Regist();};
if(isset($_POST['xRadioR']) and isset($_POST['call_Mod_Regist'])){xcall_Mod_Regist();};
function xcall_New_Regist(){
echo "<script>window.open('registnew.php','_self')</script>";
}
function xcall_Mod_Regist(){
$db = new Db();
$nRadio = $db -> quote($_POST['xRadioR']);
$result = $db -> query("select xIdR, xNome from xRegistr where xIdR ='".$_POST['xRadioR']."'") -> fetch_row();
$_SESSION['nRegisId'] = $result[0];
echo "<script>window.open('registmod.php','_self')</script>";
}
?>
<!DOCTYPE html>
<html lang='it'>
<head>
<?php
$Head = new xHead();
$Head -> xTitle('WebApp'); $Head -> xMeta();
$Head -> xBootstrap_CSS();
$Head -> xBootstrap_Theme_CSS(); $Head -> xJQuery_JS(); $Head -> xBootstrap_JS();
$Head -> xHTML5_IE(); $Head -> xAngular_JS();
?>
</head>
<body>
<!-- barra di navigazione -->
<!-- TABLE SCROLL -->
<style type="text/css">
table {width: 100%;}
thead, tbody, tr, td, th {display: block;}
tr:after {content: ' '; display: block; visibility: hidden; clear: both;}
thead th {height: 30px; /*text-align: left;*/}
tbody {height: 350px; overflow-y: auto;}
thead {/* fallback */}
tbody td, thead th {width: 25%; float: left;}
</style>
<!-- pannello completo -->
<?php
$db = new Db();
$result = $db -> query("select xIdR, xTipo, xNome, from xRegistr");
?>
<div class="container" style='padding-top: 70px;'> <div class="panel panel-primary" >
<div class="panel-heading">
<h3 class="panel-title"> elenco
<span class = "badge pull-right"> <?php echo "q.tà " . $result->num_rows; ?> </span>
</h3>
</div>
<div class="panel-body">
<form action = "<?PHP echo htmlspecialchars($_SERVER['PHP_SELF']); ?>" method="post" class="form-signin">
<?php
if($result->num_rows === 0){
echo "non ci sono dati: cliccare su nuovo </br></br>";
}else{
$riga = mysqli_num_rows($result);
$xHead = array('Id', 'Nome', 'Tipo');
echo $db->xQueryToTableRD($result, $xHead, 'xRadioR');
}
?>
<?php if($result->num_rows > 0){ ?>
<button type ="submit" name ="call_Mod_Regist" class = "pull-right btn btn-info">
<span class = "glyphicon glyphicon-user"> Modifica </span>
</button>
<?php }?>
<button type ="submit" name ="call_New_Regist" class = "pull-right btn btn-info">
<span class = "glyphicon glyphicon-user"> Nuovo </span>
</button>
</form>
</div>
</div> </div>
</body>
</html>