Jump to content

anthelo

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Posts posted by anthelo

  1. i have 2 tables.

     

    table 1

    - Id

    -Name

    -ShortId

     

    table 2

    -lots of data....

    -Category (same value with table1 Id)

     

    im trying to join this 2 tables...

     

    				$query = "SELECT * FROM tblnews_categories WHERE ShortId != 0 ORDER BY `ShortId`";
    				$result = mysql_query($query);
    				$query2 = "SELECT * FROM tblnews_categories, tblnews WHERE tblnews_categories.Id = tblnews.Category ";
    				$result2 = mysql_query($query2);
    				while($row = mysql_fetch_assoc($result))
    					{
    
    				?>
    				<div class="quartetin2">
    				<div id="HomeMoreNewsIMG2"><div id="HomeMoreNewsTitle2"><a href="summary?catid=19167"><?php echo strtoupper($row['Name']);?></a></div></div>
    				<div id="HomeMoreNewsText">
    				<?php 
    				while($row2 = mysql_fetch_assoc($result2))
    					{
    				?>
    <tr>
    	<td id="HomeLatestNewsDate"><li><?php echo strtoupper($row2['Title']);?></li></td>
    
    </tr>
    
    
    				<?php } ?>
    

     

    What i want to do is when Id = Category echo all data under the specific category

  2. not working :(

     

    This is what my code now is look like.

     

    <?php
    $requested_parts = explode('/', $requested);
    $requested = empty($_SERVER['REQUEST_URI']) ? false : $_SERVER['REQUEST_URI'];
    switch (  $requested_parts ) {
    case '/videos/':
    $content_title = 'Videos Home Directory';
    break;
    default:
    $content_title = 'Welcome to my Website!';
    }
    ?>
    
    

     

  3. Hi,

    Im having this peace of code

    <?php
    $requested = empty($_SERVER['REQUEST_URI']) ? false : $_SERVER['REQUEST_URI'];
    switch (  $requested ) {
    case '/videos/':
    $content_title = 'Videos Home Directory';
    break;
    default:
    $content_title = 'Welcome to my Website!';
    }
    ?>
    

    What im trying to do is when im on the domain www.mydomain.com will show $content_title . My problem is when im trying for example www.mydomain.com/videos/ everything is ok but when im on www.mydomain.com/videos/something_else/ I want the the same title again

    Any help please?

     

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