Old 19-04-2004, 08:36   #1 (permalink)
deliben
Registered User
 
Join Date: Apr 2004
Posts: 7
PHPSESSID is changing !!!

Hi,

I am having a huge Session problem.

There is a search routine in my project where the user can select a link whether the user wants to search a customer by company or by first name or by last name. After the selection the user now can typ in the term to search for. The result of that search will be created as a link where the user only can see the first name and the last name of the customer. For more details the user then can select the link he wants to where the detail.php is called and the details of the customer is shown.

This is where the problem starts. To recognize wich customer is selected I attache the .$row['ID']. to the detail.php . And on the detail.php I form the sql query by .$_REQUEST['rid']. (see code below)

select.php :

<?php
while ($row =mysql_fetch_assoc($result)):
echo("<a href=\"detail.php?rid=".$row['ID']."\">".$row['fname']." ".$row['lname']."</a>");

endwhile;
}

?>

detail.php:


<?php
$sql = "select customers.fname, customers.lname,
customers.number, customers.email, company.name,
city.name from customers,company,city
where customers.companyID=company.ID
AND customers.cityID=city.ID
AND customers.ID='" .$_REQUEST['rid']. "'";

$result = mysql_query($sql);

?>

I get the details shown but somehow the PHPSESSID has changed .

What am I doing wrong, can someone please help me ?
  Reply With Quote
Old 19-04-2004, 15:37   #2 (permalink)
hoowot
Registered User
 
Join Date: Apr 2004
Posts: 1
Quote:
Originally Posted by deliben

I get the details shown but somehow the PHPSESSID has changed .

What am I doing wrong, can someone please help me ?

this is just a stab in the dark, but do you mean the value of $_REQUEST['rid'] is changing? If so, try chaging $_REQUEST for $_GET .

$_REQUEST reads url, post and cookie variables, so if you have any post or cookie variables called 'rid' it could be returning those. $_GET contains only url variables.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8