table - <?php include 'tribaldb.php';...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: <?php include 'tribaldb.php'; session_start(); if($_GET['p']!="admin"){ exit(); } $x=0; echo "<link rel=stylesheet href=/css/main_gecko.css type=text/css />"; e echo "<center>"; e if($_POST['check']){ i $id = $_POST['check']; $first=$_POST['first']; $mid=$_POST['mid']; $last=$_POST['last']; $email=$_POST['email']; $dept=$_POST['dept']; $agency=$_POST['agency']; $gov=$_POST['gov']; $corp=$_POST['corp']; $book=$_POST['book']; $other=$_POST['other']; $ mysql_query("UPDATE users set first='$first', middle='$mid', last='$last', email='$email', department='$dept', agency='$agency', govcon='$gov', corpname='$corp', bookmark='$book', other='$other' WHERE id='$id' "); echo "Record has been updated"; } if($_GET['d']){ $del=$_GET['d']; echo "Are you sure you want to delete this record?<br />"; echo "<a href=$self?delete=$del>Yes</a> | <a href=javascript:history.back()>No</a>"; exit(); } if($_GET['delete']){ $id = $_GET['delete']; mysql_query("DELETE FROM `users` WHERE id='$id'"); echo "Record Deleted!";echo "Record Deleted!...
View Full Document

This note was uploaded on 07/28/2009 for the course PHP 1 taught by Professor F during the Spring '09 term at Anne Arundel CC.

Page1 / 4

table - <?php include 'tribaldb.php';...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online