Advertisement

10.16.2003 at 06:38PM PDT, ID: 20769570
[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!

6.8

session variables

Asked by whn71 in PHP Scripting Language

Tags: , ,

I have a 3 pages to authenticate users against saved info in mysql databse, files are named:
form.htm
validate.php
verify_login.php

I'm able to deal with sessoin variables in validate.php but can't pass the to next page; verify_login.php. I get the eror msg eventhough the session id does not change.

Anyone can help?

regards.

form.htm
-----------
<form action="validate.php" method="post">
  <table width="50%" border="0" align="center" cellpadding="4" cellspacing="0">
    <tr>
      <td width="22%">Username:</td>
      <td width="78%"><input name="user_name" type="text"></td>
    </tr>
    <tr>
      <td>Password:</td>
      <td><input name="password" type="password"></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="Submit" value="Submit"></td>
    </tr>
  </table>
</form>

validate.php
--------------
<?php
// start the session
session_start();
header("Cache-control: private"); //IE 6 Fix


// Get the user's input from the form
   $user_name = $_POST['user_name'];
   $password = $_POST['password'];
   $password= md5($password);
   
$db_user ="myusername";
$db_pass ="mypassword";

$connection = mysql_connect( 'localhost', $db_user, $db_pass );
mysql_select_db('mydatabase', $connection);
$query ="select * from users where username='$user_name' and PASSWORD='$password'";

$result = mysql_query($query, $connection);
$affected_rows = mysql_num_rows($result);

if ($affected_rows==1) :
      print "validated <br>";
      echo session_id();
      $_SESSION['user_name'] = $user_name;
      if (isset($_SESSION['user_name'])) {
      echo "<br>session variable is set and has the value:".$_SESSION['user_name'];
      }
      echo "<br><a href=\"verify_login.php\">verify login</a>";
else :
      print "not validated";
endif;

?>

verify_login.php
------------------
<?php
SESSION_START();
if (!isset($_SESSION['user_name'])) :
      echo "error: not loged in or session expired.";
      echo "<br>". session_id();
else:
      echo "sucessfuly verified ligin on another page";
      echo "<br>". session_id();
endif;
?>Start Free Trial
[+][-]10.16.2003 at 09:06PM PDT, ID: 9567368

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.17.2003 at 02:12AM PDT, ID: 9569131

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.17.2003 at 03:33AM PDT, ID: 9570124

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.17.2003 at 03:52AM PDT, ID: 9570378

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.17.2003 at 11:50AM PDT, ID: 9573627

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.17.2003 at 12:38PM PDT, ID: 9573886

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.17.2003 at 01:08PM PDT, ID: 9574015

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]10.17.2003 at 04:39PM PDT, ID: 9574868

View this solution now by starting your 7-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 Scripting Language
Tags: php, session, variables
Sign Up Now!
Solution Provided By: shmert
Participating Experts: 4
Solution Grade: A
 
 
[+][-]10.17.2003 at 05:17PM PDT, ID: 9574962

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.17.2003 at 05:23PM PDT, ID: 9574972

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.17.2003 at 05:24PM PDT, ID: 9574976

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.17.2003 at 05:29PM PDT, ID: 9574992

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.17.2003 at 05:45PM PDT, ID: 9575049

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.17.2003 at 06:14PM PDT, ID: 9575105

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.17.2003 at 06:17PM PDT, ID: 9575114

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.17.2003 at 06:42PM PDT, ID: 9575161

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.17.2003 at 07:14PM PDT, ID: 9575226

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.18.2003 at 08:29AM PDT, ID: 9575955

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.18.2003 at 08:45AM PDT, ID: 9575984

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.18.2003 at 03:04PM PDT, ID: 9577339

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.18.2003 at 05:23PM PDT, ID: 9577656

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

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

 
[+][-]10.18.2003 at 06:14PM PDT, ID: 9577774

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.25.2005 at 07:48PM PST, ID: 13634859

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32