Search found 4 matches

by Richard66
Tue Aug 02, 2011 4:26 am
Forum: PHP - Code
Topic: Capture clicked category and assign to variable.
Replies: 7
Views: 604

Re: Capture clicked category and assign to variable.

Thanks for your input guys! For a little more clarity: The following code grabs my first level categories from the database and displays them: I dont know if I can use the anchor tag to my advantage which currently has no value entered? <?php $dbc = mysql_connect($db_host,$db_user,$db_pass); $sdb = ...
by Richard66
Mon Aug 01, 2011 6:02 am
Forum: PHP - Code
Topic: Capture clicked category and assign to variable.
Replies: 7
Views: 604

Capture clicked category and assign to variable.

I am attempting to build a category navigation system and so far have all my tables set up and indexed in mysql. My issue is understanding the logic for retrieving the categories I want using php. I am thinking I need something like: On click - store clicked category name in variable ($category) - q...
by Richard66
Fri Jul 22, 2011 4:47 am
Forum: PHP - Code
Topic: No results from mysql query.
Replies: 2
Views: 365

Re: No results from mysql query.

Your spot on. Thankyou so much. I was storing the result from the mysql_select_db in the wrong place. I don't need to store it and also as you have shown the $query should come before the database connection in $result.
by Richard66
Thu Jul 21, 2011 5:25 am
Forum: PHP - Code
Topic: No results from mysql query.
Replies: 2
Views: 365

No results from mysql query.

Hi all, I have the following code and the relevant database and tables set up on a localhost. Yet the query is returning nothing. No error message or results. <?php $db_host = 'localhost'; $db_user = 'root'; $db_pass = 'root'; $db_database = 'bbg_db_2'; $dbc = mysql_connect($db_host,$db_user,$db_pas...