Jump to content

Are headers smarter than me?


ecabrera

Recommended Posts

ok i read the header part but i sure i did it rite but its givong me those erros

 

<?php
session_start();
$username = $_SESSION['username'];
?>
<?php

require "scripts/connect.php";

if($_POST['submitbtn']){

$body = mysql_real_escape_string($_POST['area1']);

if($body){

$query = mysql_query("UPDATE history SET body ='$body'");
echo $msg = "UPDATED GOOD";
header('location: http://www.rbrhslsp.org/rbrhsadmins/edithistory');

}else
    $msg = "Please fill in the body";
}
mysql_close();
?>
<?php

require "scripts/connect.php";

$query = mysql_query("SELECT * FROM history");
$rows = mysql_fetch_assoc($query);

$body = stripslashes($rows['body']);

mysql_close();
?>
<?php
require "header.php";
?>
<?php if ($username){?>

<div id="leftContent">
<h4>
    Your page
  </h4>
<?php echo $msg;?>
<form action='edithistory' method='post'>
  <textarea style="height: 100px; width:490px;" name="area1" cols="58"><?php echo $body;?></textarea>
<input type='submit' name='submitbtn' value='Submit' />
</form>

</div>

Link to comment
https://forums.phpfreaks.com/topic/254225-are-headers-smarter-than-me/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.