Jump to content

Joomla Help


prcollin

Recommended Posts

I usually design my sites from the ground up but wanted to use joomla for ease of template design and user access designation.

 

Anyway here is my problem.  I created this whole site, and I am migrating it from HTML/PHP to Joomla.  I figured out how to include php into my articles etc etc so all that is working fine.  What i cant get to work is this. 

 

In my old site i had links set up like this

 

<a href="display.php?category=accounting">Accounting</a>

 

then i had a display.php page that had this code

 

<?php
include("connect.php");
if(isset($_GET['category']) && $_GET['category'] !='')
{
   $category = $_GET['category'];
   echo '<a href="index.html">Home</a><br>';

$result = mysql_query("SELECT * FROM ttav WHERE ttav_category= '" . mysql_real_escape_string($category) . "'")or die(mysql_error());
$rowcount = mysql_num_rows($result);
if ($rowcount >= 1)
{
while($row = mysql_fetch_array($result))
{
    echo $row['ttav_category'] . " " . $row['ttav_date'];
}
}
else
{
{
    echo "No Records Found";
}
}
mysql_close($con);
}


?>

 

That all worked fine and nice on my basic site.  Now to migrate over what i did is change the link code from

 

<a href="display.php?category=accounting">Accounting</a>

 

to

 

<a href="index.php?option=com_content&view=article&id=47?category=accounting">Accounting</a>

 

Which calls on the article that contains the display script from above in it. 

 

I debugged everything up through the database etc etc and the form that i created in another article publishes to the database so i know it is connecting. 

 

My problem is that when i click on the links, it brings me to my display page fine but displays no results even when the conditions are met.  Anyone know if you cant use $_GET in joomla?  or if there is something else i should try.

Link to comment
https://forums.phpfreaks.com/topic/220152-joomla-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.