provide hyperlink for record in database
Posted: Wed Mar 31, 2004 9:39 am
hi
I will try to explain my problem as much as i can....
I am designing a message system in php. I have a messages table which have the following fields: receiver_id,sender_id,subject,message,date
I can display the messages for a particular user by querying the messages table and returning all the records which have that members id in the reciever_id field.I display the messages in a html table with columns:sender,subject and date.
Now what i want is that when the user clicks on the subject of the message he should be taken to that message.(maybe by giving the hyperlink to subject). I am not able to work out how to do this.(how to set a variable in php equal to the subject of message and then query the database using the subject can be one option, but i am not able to figure it out how to do this..how to get the subject field content if there are many messages and how to figure out which hyperlink the user clicked?)
Any suggestion or help would be appreciated.
Thanks
MANISH
I will try to explain my problem as much as i can....
I am designing a message system in php. I have a messages table which have the following fields: receiver_id,sender_id,subject,message,date
I can display the messages for a particular user by querying the messages table and returning all the records which have that members id in the reciever_id field.I display the messages in a html table with columns:sender,subject and date.
Now what i want is that when the user clicks on the subject of the message he should be taken to that message.(maybe by giving the hyperlink to subject). I am not able to work out how to do this.(how to set a variable in php equal to the subject of message and then query the database using the subject can be one option, but i am not able to figure it out how to do this..how to get the subject field content if there are many messages and how to figure out which hyperlink the user clicked?)
Any suggestion or help would be appreciated.
Thanks
MANISH