Below i made a MySQL Table in my phpmyadmin.

Click Here for a screenshot of my phpmyadmin table

I want to print on my php page the cat_name of a cat_id of my choosing. What code would i use exactly for that? I am looking at this guide here But i am not figuring it out completely maybe someone can guide me in the right direction?

Basically if i choose a row with cat_id 5 it should print out the cat_name associated with that cat_id.

How do i approach this?

Recommended Answers

All 4 Replies

Member Avatar for LastMitch

@mystycs

I want to print on my php page the cat_name of a cat_id of my choosing. What code would i use exactly for that? I am looking at this guide here But i am not figuring it out completely maybe someone can guide me in the right direction?

Can you provide the query with this? So it will be easier to see where you are at.

If you don't have a query then look at this webpage and there will be an example how to print the table:

http://www.siteground.com/tutorials/php-mysql/display_table_data.htm

or read this and used this example too:

http://php.about.com/od/phpwithmysql/ss/mysql_php.htm

Can you please provide more explanations? Please?! :)

Member Avatar for LastMitch

@cigoL..:)

Can you please provide more explanations? Please?! :)

I think mystycs provide a image already but not sure if mystycs has a code with it.

Member Avatar for diafol

Do you want to create a connection, query the database and get output to the screen? You want to know how to use things like mysql_query()? If so, there are a million tutorials on the internet - just Google.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.