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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.