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?

Re: How can i print something from a table that i need? 80 80
Member Avatar

@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

Re: How can i print something from a table that i need? 80 80

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

Re: How can i print something from a table that i need? 80 80
Member Avatar

@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.

Re: How can i print something from a table that i need? 80 80
Member Avatar

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 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.