Jump to content
Larry Ullman's Book Forums

dianefoster

Members
  • Content Count

    7
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by dianefoster

  1. edit.php <?php session_start(); if( !isset($_SESSION['empID']) ) { header("Location: login.php"); exit; } elseif ( (isset($_SESSION['empID'])) && !$_GET['empID']){ header("Location: update.php?user=" . $_SESSION['empID']); } else{ // select loggedin users detail $res=mysql_query("SELECT * FROM Staff WHERE empID=".$_SESSION['empID']); $userRow=mysql_fetch_array($res); $id = $_GET['empID']; } $thisPage = "edit"; include('includes/header.html'); include('includes/nav1.php'); echo '<h1>Edit Patients</h1>'; require_once('../mysqli_connect.php');
  2. <?php $thisPage = 'update'; include('includes/header.html'); include('includes/nav1.php'); if($_SERVER['REQUEST_METHOD'] == 'POST') { require('../mysqli_connect.php'); $errors = array(); if (empty($_POST['login'])) { $errors[] = 'You forgot to enter your login'; } else { $lgn = mysqli_real_escape_string($dbc, trim($_POST['login'])); } if (empty($_POST['pwd'])) { $errors[] = 'You forgot to enter your password'; } else { $p = mysqli_real_escape_string($dbc, trim($_POST['pwd'])); } if (!empty($_POST['pwd1'])) { if($_POST['pwd1'] != $_POST['pwd2']) { $errors[] = 'Your new password did not
  3. <?php // This page defines two functions used by login/logout function. /*This function determines an absolute URL, and redirects the user there. *The function takes one argument, the to be redirected to. *?the arguemnt defaults to index.php. */ function redirect_user ($page = "index.php") { // Start defining the URL. // URL is 'http:// ' . $_SERVER['HTTP_HOST'] . dirname ([$_SERVER['PHP_SELF']): $url = 'http://' . $_SERVER['localhost'] . medicalcenter($_SERVER['PHP_SELF']); // Remove the any trailing slashes; $url = rtrim($url,'/\\'); // Add the page: $url .= '/'. $page;
  4. <?php // This page defines two functions used by the login/logout process. /* This function determines an absolute URL and redirects the user there. * The function takes one argument: the page to be redirected to. * The argument defaults to index.php. */ function redirect_user ($page = 'index.php') { $url = 'http://' . $_SERVER['localhost'] . mecicalcenter($_SERVER['PHP_SELF']); // Remove any trailing slashes: $url = rtrim($url, '/\\'); // Add the page: $url .= '/' . $page; // Redirect the user: header("Location: $url"); exit(); // Quit the script. } // End
  5. <li><a href = "adelaide.html" id ="ade" a.mouseout ="function()" a.mouseover ="function()" >Adelaide</a></li> <li><a href="alicesprings.html" class ="caption" id ="alicesprings" >Alice Springs</a></li> <li><a href="broome.html" >Broome</a> </li> <li><a href="cairns.html" >Cairns</a> </li> <li><a href="canberra.html" >Canberra</a> </li> </ul> </div> <div id ="div13"> <ul> <li><a href ="darwin.html">Da
  6. <li><a href = "adelaide.html" id ="ade" a.mouseout ="function()" a.mouseover ="function()" >Adelaide</a></li> <li><a href="alicesprings.html" class ="caption" id ="alicesprings" >Alice Springs</a></li> <li><a href="broome.html" >Broome</a> </li> <li><a href="cairns.html" >Cairns</a> </li> <li><a href="canberra.html" >Canberra</a> </li> </ul> </div> <div id ="div13"> <ul> <li><a href ="darwin.html">Da
  7. <ul> <li><a href="adelaide.html" class = "caption">Adelaide</a></li> <li><a href="alicesprings.html" class ="caption" id="central" Alice Springs</a></li> <li><a href= broome.html" class ="caption" id="broome" >Broome</a> </li> <li><a href="cairns.html" class ="caption" id="cairns" >Cairns</a> </li> <li><a href="canberra.html" class ="caption" id="canberra" >Canberra</a> </li> </ul> window.onload = rolloverInit;
×
×
  • Create New...