Jump to content


Show And Hide Using PHP?


  • Please log in to reply
21 replies to this topic

#21 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 30 September 2006 - 03:27 PM

Ok. I got rid of all the heredoc statements. Try this:
echo '
    <tr>
        <td><img src="images/cat_left_top.jpg" width="180" height="40"></td>
    </tr>';

$categories = mysql_query("SELECT * FROM store_categories ORDER BY id");

while($c = mysql_fetch_assoc($categories))
{
    echo '
    <tr>
        <td class="cat_text">
            <a href="?list=' . $c['id'] .'">' . $c['categorie_name'] . '</a>';

    if(isset($_GET['list']) && is_numeric($_GET['list']) && $_GET['list'] == $c['id'])
    {
	    $_GET['list'] = mysql_real_Escape_string($_GET['list']);

        $sql = "SELECT * FROM store_categorie_list WHERE list_categorie_id='" . $_GET['list'] . "' ORDER BY id";

        $c_list = mysql_query($sql);

        echo "\t\t\t<p>\n";

        while($c_list_item = mysql_fetch_assoc($c_list))
        {
            echo "\t\t\t\t--- {$categorie_list_get['list_name']}<br />\n";
        }
    }

    echo '
            </p>
		</td>
    </tr>';
}

echo '
    <tr>
        <td height="0"><hr align="center" width="170" size="1" noshade class="cat_bar"></td>
    </tr>';
if you cannot get that code to work then there is an error with your code. if you get any error post the full code here.

#22 Guest_hauntmisery_*

Guest_hauntmisery_*
  • Guests

Posted 01 October 2006 - 08:25 AM

nice nice nice.. it works thanks!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users