how-to-view-all-fields-in-a-database-after-clicking-one-data

Sorry I could not find words to describe my issue. May be you will understand.

Tools: PHP & MySQL

I have created a database with fields: CID, Name, DOB, Gender, EmailID. Data: 01, Kunal, 18.10.1988, Male, [email protected]
I am able to display all/one data as required in a table.

Example: Suppose I display only CID and Name.

What i want: I would click on CID and it will show all informations(CID, Name, DOB, Gender, EmailID) in another new page with an option “ok”.

Please suggest!!!

Regards, Sourav

When displaying the CID you are displaying on the page, turn it into a link.
eg. data.php?cid=5 where cid= the displayed cid value in the database.
On the new page alter your mysql query to
$cid = $_GET[‘CID’];
select * from table WHERE CID = $cid

Ofcourse since using $_GET to retrieve data you will want to include checks to make sure someone isn’t just entering in the URL manually.

Sponsor our Newsletter | Privacy Policy | Terms of Service