[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.0

is my query out of order?

Asked by rcleon in PHP and Databases

Tags: can, forms, i

Page 1 Userlist.php

This page list all the users in the sml table. It is simple and it does display all the users. When the view button is press it should cary the UID to the next page.


<?php
SESSION_START();
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
      <title>Untitled</title>

<style>

body {
      font-family: Arial, Helvetica, sans-serif;
      font-size: small;
      background: url(images/bg.gif);
}

</style>

</head>

<body>

<p>&nbsp;</p><p>&nbsp;</p>

<?php

$dbHostName = "localhost";

$dbUserName = "bcgint";

$dbPassword = "anise97";

$dbName = "bcgint";

function showerror()
{
die("Error " . mysql_errno() . " : " . mysql_error() );
}

$Query = "SELECT * FROM sml";

if (!($dbc = @ mysql_connect($dbHostName, $dbUserName, $dbPassword)))
die("Could not connect to MySQL");

if (!(mysql_select_db($dbName, $dbc)))
showerror();

if (!($Result = @ mysql_query ($Query, $dbc)))
showerror();

function DisplayUsers($Result)

{

print "\n<table border='1' align='center' width='750' cellpadding='2' cellspacing='0' bgcolor='#F0F0F0'>\n<tr>\n" .
"\n<tr>" .
"\n\t<th width='200'>First Name</th>" .
"\n\t<th width='200'>Last Name</th>" .
"\n\t<th width='200'>Username</th>" .
"\n\t<th width='100'>Password</th>" .
"\n\t<th width='150'>Action</th>" .
"\n<tr>";

while ($Row = @mysql_fetch_array($Result))

{

print "\n<tr>";

print "<td>" . $Row[FirstName] . "</td>";
print "<td>" . $Row[LastName] . "</td>";
print "<td>" . $Row[Username] . "</td>";
print "<td>" . $Row[Password] . "</td>";
print "<td>" . "<form method='POST' action='Welcome.php'>" . "<input type='hidden' value='$Row[UID]' name='name'>" . "<input type='submit' value='View'>" . "</form>" . "</td>";
print "\n</tr>";

}

print "\n</table>\n";

}

DisplayUsers($Result);

?>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>

</body>
</html>

Page 2 should have the UID so that I could then display personal information.

<?php
SESSION_START();

$UID = $_POST['UID'];

$_SESSION['UID'] = $UID;

require('ConfigE.php');

require 'DBC.php';

echo "Session: <pre>";
print_r($_SESSION);
echo "</pre>";
?>

Here is the result of the above code.

Session:
Array
(
    [UID] =>
)

As you can see the UID is blank I'm ready to pull all my hair.

Thanks for your help.

Rafael


[+][-]10/02/05 08:06 PM, ID: 15004106Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: PHP and Databases
Tags: can, forms, i
Sign Up Now!
Solution Provided By: msiedle
Participating Experts: 5
Solution Grade: A
 
[+][-]09/25/05 09:21 PM, ID: 14956358Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/25/05 11:04 PM, ID: 14956634Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/25/05 11:07 PM, ID: 14956638Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/25/05 11:09 PM, ID: 14956648Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/25/05 11:10 PM, ID: 14956654Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/26/05 06:10 AM, ID: 14958366Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/26/05 08:12 AM, ID: 14959375Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/26/05 09:35 AM, ID: 14960253Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/26/05 04:55 PM, ID: 14963459Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/27/05 01:25 AM, ID: 14964985Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/29/05 06:32 PM, ID: 14989235Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/02/05 11:13 AM, ID: 15002525Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/02/05 08:09 PM, ID: 15004114Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/02/05 09:46 PM, ID: 15004376Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/02/05 10:47 PM, ID: 15004485Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93