I noticed that you said you're using jooml2 and I'm using 3. The code worked great and I so do appreciate it. I do have one warning (only warning) and it's not affecting anything that I have seen yet. Here is the warning.
Warning: mysql_real_escape_string(): 71 is not a valid MySQL-Link resource in /home/homerep7/public_html/libraries/joomla/database/driver/mysql.php on line 132
Sure would appreciate the help. I'm sure it's probably just a version issue with joomla??
Welcome to the Q&A site for Question2Answer.
If you have a question about Q2A, please ask here, in English.
To report a bug, please create a new issue on Github or ask a question here with the bug tag.
If you just want to try Q2A, please use the demo site.