Hi,
I am having a huge Session problem. I am working on a WAP Projekt and use PHP 4.3.4 WML and MySQL .I know that after a user is loged in thats where the session begins to start. I do update the DB so that I insert the session_id() to the data record where the user id is set. Then I know the session starts because I see in the browser that the PHPSESID is attached to the site I apply. However I don´t see that on every site I apply. I even don´t know if I have to see the PHPSESID is attached to the site I applied. I have to admit I have never worked with sessions.
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 use Deck-It as an emulator. This is giving me the following error message every time and I can not figure out what am I supposed to do to get rid of this error.
- error "not well-formed" at line 4 character 97
Line 4 in the source window of Deck-It is:
<b>Results:</b> <br/><p align="center">Select a customer:<br/><a href="detail.php?rid=1&PHPSESSID=25d9df7f1b1873e443d68dac7bcfcff2">dau superdau</a></p>
can please some php/wml guru help me out ?