Hi everyone,
I am having trouble retrieving and displaying information from my database.
What I have set up is a login and password that when inputed correctly displays a page containing a form. I want to show company information at the top of the form eg. project number, client name, etc.
The login name is the same as the client name, and the password is the same as the project number. So basically all I want to do is display the login and password at the top of the form.
Clients will change all the time so it has to be dynamic.
I had a go at a script below but it is coming up with this error...
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /Applications/xampp/xamppfiles/htdocs/resolve/includes/DbConnector.php on line 50
Code as below...
<?php
session_start();
if (!isset($_SESSION['db_is_logged_in']) || $_SESSION['db_is_logged_in'] !== true) {
header('Location: clientsurvey.php');
exit;
}
require('includes/header10.php');
?>
<div id="container3">
<html>
<head>
<title>Resolve Group Admin Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<p><h2>Resolve Group Client Survey</h2>
</head>
<body>
<FORM ACTION="mailto:cain_fleming@hotmail.com.com">
<p>
<?php
// Require the database class
require_once('includes/DbConnector.php');
// Create a new DbConnector object
$connector = new DbConnector();
// IMPORTANT!!! Validate the ID number. See next article
// Execute the query to retrieve the selected article
$result = $connector->query('SELECT project_name FROM clients WHERE ID = '.$HTTP_GET_VARS['id']);
// Get an array containing the resulting record
$row = $connector->fetchArray($result);
?>
<b><?php echo $row['project_name'];?></b>
.....