嘿,这样我就应该将一些信息放入数据库中,但是当它这样做时,它不会让我导出登录页面。这将只是空话白。
文件名activate.php
<?php
include ("include/database/db.php");
if($stmt = $mysqli->prepare("SELECT `code`,`rank` FROM `brugere` WHERE `code` = ?"))
{
$stmt->bind_param('s', $g_code);
$g_code = $_GET["code"];
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($code, $rank);
$stmt->fetch();
$count_res = $stmt->num_rows;
$stmt->close();
if($count_res > 0)
{
if($rank == 0)
{
echo "<h3 class=\"toptitlecontent\">Godkende email</h3>";
echo "<div id=\"box\"><ul><li>Husk at skrive alt ude på siden!</li></ul></div>";
$_SESSION["code"] = $g_code;
?>
<div id="midtbox_alt">
<form action="http://,,,.dk/activate_updater.php" method="post" name="formular" onsubmit="return validerform ()" enctype="multipart/form-data">
<table border="0">
<tr>
<td id="tb-w_a"><p>Kategori</p></td>
<td>:</td>
<td>
<select name="kategori">
<?php
$query = "SELECT id_katogori, navn FROM kategori";
$result = $mysqli->query($query);
while(list($id_katogori, $navn) = $result->fetch_row())
{
echo "<option value=\"$id_katogori\">$navn</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td id="tb-w_a"><p>Djnavn</p></td>
<td>:</td>
<td><input type="text" name="djnavn"></td>
</tr>
<tr>
<td id="tb-w_a"><p>Facebook</p></td>
<td>:</td>
<td><input type="text" name="facebook"></td>
</tr>
<tr>
<td id="tb-w_a"><p>Pris</p></td>
<td>:</td>
<td><input type="text" name="pris"></td>
</tr>
<tr>
<td id="tb-w_a"><p>Booking Email</p></td>
<td>:</td>
<td><input type="email" name="booking"></td>
</tr>
<tr>
<td id="tb-w_a"><p>Mobil</p></td>
<td>:</td>
<td><input type="text" name="mobil"></td>
</tr>
<tr>
<td id="tb-w_a"><p>Upload Profil</p></td>
<td>:</td>
<td><input type="file" name="file"></td>
</tr>
</table>
<textarea name="profiltekst" style="width:500px; height:170px;"></textarea><br />
<input type="submit" value="Godkend brugere" name="godkendt-brugere">
</form>
</div>
<?php
}
if($rank == 2)
{
echo "<h3 class=\"toptitlecontent\">Forkert Email</h3>";
echo "<div id=\"box\"><ul><li>Din bruger er allerede godkendt</li></ul></div>";
}
}
else {
/* Der er opstået en fejl */
echo "<h3 class=\"toptitlecontent\">Ukendt side!</h3>";
echo "<div id=\"box\"><ul><li>Der opstod en fejl</li></ul></div>";
}
}
?>
原因我有不必要的搅动这就是这样一个网站无法在谷歌上获得的原因.. 或者在这里因为我有帮助并且没有出现在谷歌上所以其他人可以看到我或说什么?
她的 http: //,,,.dk/activate_updater.php
文件名
激活更新程序.php
<?php include ("include/database/db.php");?>
<?php
session_start();
if($stmt = $mysqli->prepare('UPDATE `brugere` SET `rank`=2, `katogori`=?, `djnavn`=?, `profilbillede`=?, `profiltekst`=?, `facebook`=?, `pris`=?, `booking`=?, `mobil`=? WHERE `code`=?'))
{
$stmt->bind_param('iiiiiiiis', $katogori, $djnavn, $profilbillede, $profiltekst, $facebook, $pris, $booking, $mobil, $g_code);
//fra input ting ting..
$katogori = $_POST["kategori"];
$djnavn = $_POST["djnavn"];
$profilbillede = $file;
$profiltekst = $_POST["profiltekst"];
$facebook = $_POST["facebook"];
$pris = $_POST["pris"];
$booking = $_POST["booking"];
$mobil = $_POST["mobil"];
$g_code = $_SESSION["code"];
$stmt->execute();
$stmt->close();
}
else
{
echo 'Der opstod en fejl i erklæringen: ' . $mysqli->error;
}
?>
所以问题是它不会让我被重定向到另一个页面..