List menu - Help!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cnl83
Forum Commoner
Posts: 44
Joined: Mon Sep 26, 2005 10:34 am

List menu - Help!

Post by cnl83 »

I have a list menu that is populated with mysql data. It's a list of customers. When you make a selection, I want a page to show all of the data about that particular customer. Im not sure how to accomplish this. Should I be passing variables through the browswer, or what?

Im using Dreamweaver cs 4.

Thank you in advance!
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: List menu - Help!

Post by social_experiment »

Code: Select all

<a href="page.php?id=5">To ID 5</a>
You have to use $_GET. The value '5' will this be example will be in $_GET['id'] (your example will differ). Once you have that value you need to sanitize it, make it safe to use in a query (mysql_real_escape_string()). Do you have any code that you can paste?
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Post Reply