hey this is so that I should just have put some infomation into the database but it is such that when it did it would not send me to export the login page. it will just be empty words white.
File name 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>";
}
}
?>
reason I have needless churning Here’s how it is such a website does not get on google .. or here as I have spurget help and do not appear on google so others can see me or what to say?
HER http://,,,.dk/activate_updater.php
File name
activate_updater.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;
}
?>
so problem is just it will not let me be redirected to another page ..
I don’t see where you are redirecting at all, but this is not going to work:
You are sending output to the browser (a new line between the closing and the opening of the php tags) and
session_startneeds to send headers, which it cannot do if the headers have already been sent.I’m guessing you’ll see at least one
headers already senterror message, when you enable error messaging at the top of your script:Edit: To be clear, I don’t see any redirect in
activate_updater.phpnor does it display anything upon a successful update, so if theheaders already sentpart is not the problem, it’s probably this.