Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.