database fetch id corrosponding to name

i have a list of name(fetch from database).
eg:
id name
11 cppp
. .
. .

->i want onclick of cpp(name) it’s id 11 get.
b/c in wordpress i want like http://localhost/wp_demo/wordpress/?page_id=11

Is this what you mean?

[php] cppp or how ever you want your link to show like [/php]

@
lothop
Expert PHP Helper
Senior Member

I HAVE fetched name from database… i want onclick particular name get it’s id from database…$_GET[‘id’] is used for one page to another not for db purpose.

So you have the name, within your database “grab and display” just include the ID and put it in a link?

[php] ‘.$row[‘name’].’ [/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service