last day (15 days later) » 

7:01 PM
0
A: herf link is not working php mysql

affazThe value will be in msgdetail_id So in PHP code, if (isset($_REQUEST['msgdetail_id']) && !empty($_REQUEST['msgdetail_id'])) { $id = $_REQUEST['msgdetail_id']; } else { header("Location: readmsg.php"); }

 
yeah, it can direct to readmsgdetail.php now. thx! Is there any other way for me to show only one person's detail? Because it is displaying all the user's information now.
 
is that code posted above in your question?
@xhinvis ur msgid is unique right?
 
After I replace with ur code, it displays all the users' details.Is any other way for me just display only one user's detail with the use of msgid? I have uploaded the picture for the website, please take a look.
yes, msgid is unique
 
you did not give the where condition in select query
$stmt = $DB_con->prepare('SELECT firstname,lastname,phone,enquiry FROM user_message where msgid=$id');
 
It says "Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column '$id' in 'where clause'"
 
7:01 PM
then set the value of $id to session and give that session
 
I am not so sure how to set the value of $id to session.. sorry, im a new leaner in php
 
$_SESSION['msgid']=$id;
 
where should I put in this code ?
 
after $id = $_REQUEST['msgdetail_id'];
 
It still showing the uncaught PDOEexpection.
 
7:11 PM
no..u have to give the value of session there
wait
give $stmt = $DB_con->prepare("SELECT firstname,lastname,phone,enquiry FROM user_message where msgid='$id'");
 
it says no data found
 
does that msgid have data
pls upload screenshot of the php page
 
I have uploaded the picture
I have a similar page for this
 
your updated code
 
i have a similar page, do your want to take a look?
 
7:44 PM
yes
 

  last day (15 days later) »