<?php session_start();
$id = $_SESSION['id'];
$query = mysql_query("SELECT * FROM register WHERE id = '$id'") or die (mysql_error ());
<!DOCTYPE html>
<link rel="stylesheet" type="text/css" href="styles.css" />
<html lang="en">
<meta charset="utf-8">
<link rel="stylesheet" href="css/reset.css" type="text/css" media="all">
<link rel="stylesheet" href="css/layout.css" type="text/css" media="all">
<link rel="stylesheet" href="css/style.css" type="text/css" media="all">
<script type="text/javascript" src="js/jquery-1.4.2.js" ></script>
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/cufon-replace.js"></script>
<script type="text/javascript" src="js/Myriad_Pro_italic_600.font.js"></script>
<script type="text/javascript" src="js/Myriad_Pro_italic_400.font.js"></script>
<script type="text/javascript" src="js/Myriad_Pro_400.font.js"></script>
<!--[if lt IE 9]>
    <script type="text/javascript" src="http://info.template-help.com/files/ie6_warning/ie6_script_other.js"></script>
    <script type="text/javascript" src="js/html5.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
body,td,th {
    font-size: 10px;
<body id="page2">
<div class="body1">
    <div class="main">
<!-- header -->
            <div class="wrapper">
                <h1><a href="index.html" id="logo">Air Lines</a><span id="slogan">International Travel</span></h1>
              <div class="right">
                        <ul id="top_nav">
                            <li><a href="index.html"><img src="images/img1.gif" alt=""></a></li>
                            <li><a href="index-4.html"><img src="images/img2.gif" alt=""></a></li>
                            <li class="bg_none"><a href="#"><img src="images/img3.gif" alt=""></a></li>

            <ul id="menu">
              <li id="menu_active"><a href="index.php">Home</a></li>
                            <li ><a href="LSU.php">Login/sign up</a></li>
                            <li><a href="V&M.php">Vision and mission</a></li>

                            <li><a href="contact.php">Contacts</a></li>
                    </ul>                  </nav>
<div class="main">
    <div id="banner"></div>
<!-- header -->
<div class="main">
<!-- content -->
    <section id="content">
        <article class="col1">
          <div class="pad_1">
 <h2 id="coq">Vision and Mission</h2>'
 <p> </p>
 <p> </p>
            <p> </p>
        <article class="col2 pad_left1">
          <div id="slideshow">

    <ul class="slides">
        <li><img src="img/photos/1.jpg" width="420" height="320" alt="Marsa Alam underawter close up" /></li>
        <li><img src="img/photos/2.jpg" width="420" height="320" alt="Turrimetta Beach - Dawn" /></li>
        <li><img src="img/photos/3.jpg" width="420" height="320" alt="Power Station" /></li>
        <li><img src="img/photos/4.jpg" width="420" height="320" alt="Colors of Nature" /></li>
    <span class="arrow previous"></span>
    <span class="arrow next"></span>

          <h3>Our vision</h3>
To be the largest low cost airline in Asia and serving the 3 billion   people who are currently underserved with poor connectivity and high   fares. <br>
<h3>Our mission</h3>
  <li>To be the best company to work for whereby employees are treated as part of a big family</li>
  <li>Create a globally recognized ASEAN brand</li>
  <li>To attain the lowest cost so that everyone can fly with AirAsia</li>
  <li>Maintain the highest quality product, embracing technology to reduce cost and enhance service levels </li>
<h3>Our values</h3>
We make the low fare model possible through the implementation of the following key strategies,
<ul><li><strong>1- Safety First:<br>
  <li><strong>2- High Aircraft Utilisation:</strong> <br>
  <li><strong>3- Low Fare, No Frills:</strong> <br>
  <li><strong>4- Streamline Operations:</strong> <br>
  <li><strong>5- Lean Distribution System:</strong> <br>
  <li><strong>6- Point to Point Network:</strong> <br>
<h2> </h2>
<h2> </h2>
<!-- / content -->
<div class="body2">
    <div class="main">
<!--footer -->
            Website template designed by <a href="http://www.templatemonster.com/" target="_blank" rel="nofollow">Mohammad Alshawamri</a><br>
            CRM For AirAsia <a href="http://www.templates.com/product/3d-models/" target="_blank" rel="nofollow"></a>
<!-- / footer -->
<!-- / footer -->
<script type="text/javascript"> Cufon.now(); </script>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="script.js"></script>

<? }
echo "Unauthorized access";
header("Refresh: 3; index.php");
5 Years
Discussion Span
Last Post by leviathan185

you cannot output before you use header() remove the echo "Unauthorized access"; and it should work.

you could set a $_SESSION['message'] = "Unauthorized access"; and display it on the next page.

don't forget to unset it once you have displayed the message though.

Edited by leviathan185


I remooved the echo "Unauthorized access";
but it drives me back to the home page


that is what you are telling the header call to do? refresh in 3 sec to index.php
I think you may also be able to put your echo call after the header function and it wil be displayed just before the user is redirected.


in this page isa code for slideshow of photos
and then some writing under it

it was working just fine, until this morning, I tried to add some photos inside
the photos folder of the slideshow
i deleted the photos but still got the problem


on closer look at this you are checking if $_SESSION['idAdmin'] has been set. if not refresh to index.php in 3 seconds.

Is this code from index.php? if it is all you are going to get here is your page will just keep refreshing because $_SESSION['idAdmin'] will never be set

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.