Jump to content

I Need Help


neverforget98

Recommended Posts

I've been using snippets plus my own knowledge to code a new system called Integrated Services for my organization. I know SOMETHING is wrong but I can't find what, it's a snippet that I found that I REALLY like. Can you guys try to find out why I'm getting the error below? I have included the code too! :) Thanks so much! I think this line $result=mysql_query("SELECT * FROM users ORDER BY id ID"); and this line while($res=mysql_fetch_array($result)){ are causing the problems!

 

20121102-tn4-33kb.jpg

 

 

<?php
session_start();
require("inc/mysql.php");
require("inc/Membership.class.php");
$Member = new Membership($DBH);
require("inc/membership.php");
//test user permissions
if(!$Member->test_perms(2))
{
//No perms, echo error or forward or something
header( 'Location: nopermission.php' ) ;
}
?>

<html>
<head>
<title>Users | OUB's Integrated Services</title>
<meta name="description" content="">
<meta name="author" content="Brandin Arsenault, OUB">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<script src="./ajax/libs/jquery/1/jquery.min.js"></script>
<link rel="stylesheet" href="css/960.css" />
<link rel="stylesheet" href="style.css" />
<script src="js/scripts.js"></script>
<script type="text/javascript" language="javascript" src="jquery-1.2.6.min.js"></script>
<div id="message_box">
<?php {
echo "Hello, " . $Member->get_field("real_name");

}?>
</div>
<?php
//including the database connection file
include_once("inc/usersdb.php");
//fetching data in descending order (lastest entry first)
$result=mysql_query("SELECT * FROM users ORDER BY id ID");
?>
</head>
<body>
<br /><br /><br /><br />
<?php
include 'header.php';
?>
<br /><br />
<center><h5>INTEGRATED SERVICES USERS</center>
<br />
<center>
<?php
echo "<table width='100%' border=0>";
echo "<tr>";
echo "<th>ID</th>";
echo "<th>Name</th>";
echo "<th>Username</th>";
echo "<th>Position</th>";
echo "<th>Email</th>";
echo "<th>Alternate Email</th>";
echo "<th>Home Number</th>";
echo "<th>Mobile Number</th>";
echo "<th>System Username</th>";
echo "<th>System Password</th>";
echo "<th>NDA</th>";
echo "<th>PCA</th>";
echo "<th>TOU</th>";
echo "<th>Permissions</th>";
echo "<th>Update</th>";
echo "</tr>";
while($res=mysql_fetch_array($result)){

echo "<tr bgcolor='#CCCCCC'>";
echo "<td>".$res['id']."</td>";
echo "<td>".$res['real_name']."</td>";
echo "<td>".$res['username']."</td>";
echo "<td>".$res['position']."</td>";
echo "<td>".$res['email']."</td>";
echo "<td>".$res['altemail']."</td>";
echo "<td>".$res['hnumber']."</td>";
echo "<td>".$res['mnumber']."</td>";
echo "<td>".$res['sysusername']."</td>";
echo "<td>".$res['syspassword']."</td>";
echo "<td>".$res['nondisclosure']."</td>";
echo "<td>".$res['properconduct']."</td>";
echo "<td>".$res['termsofuse']."</td>";
echo "<td>".$res['perms']."</td>";
echo "<td><a href=\"edit.php?id=$res[id]\">Edit</a> | <a href=\"delete.php?id=$res[id]\">Delete</a></td>";

}
echo "</table>";
?>
<p><a href="auseradd.php">Add New User</a></p>

<?php
include 'logout.php';
?>
</body>
</html>

 

Thanks again, <33s

Edited by neverforget98
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.