I need help, link in php

Discussion in 'PHP' started by georgege, Apr 30, 2009.

  1. #1
    Where I mistake?

    I want to do "column" link, how can to do?
    Links is: 1.php, 2.php, 3.php, etc.
    Another question:
    I want order by hour, how can I to do?

    <?
    	$land = $_GET;
    	include "cone.php";
    	
    	$links = array('1.php','2.php','3.php','4.php','5.php','6.php','7.php','8.php','9.php','10.php');
        $num = count($links);
        $i=1;
    	while(list(, $item) = each($links)){ 
        if($i % 2 ==0) { 
        $bgcolor='#FFBB00'; 
        } else { 
        $bgcolor='#FF8C00'; 
        }
    
    ?>                  </td>
                    </tr>
                    <tr align="center" style="background: <?php echo $bgcolor; ?>">
                      <td align="center"><?php				
    	$query = "select * from lands where day like 'april 30'"; 
    					
    	$result = mysql_query($query) or die("Query failed");
    	
    	$rezult = array();
    	while ($row = mysql_fetch_array($result)) 
    	{
    	
    	    echo "<table border='0' style='height:auto' bgcolor='#FFBB00' width='450' align='center' cellspacing='0'>"; 
    		echo "<tr>";
    		echo "<td bgcolor='#FF8C00' width='190' colspan='5'>".$row["land"].'&nbsp;'."".'&nbsp;'.$row["land1"].":</td>";
    		echo "<td bgcolor='#FF8C00' colspan='3' align='right' width='90'>".$row["land2"]."</td>";
    		echo "</tr>";
    		echo "<tr>";
    		echo "<td align='center' width='60' colspan='3'>".$row["hour"]."</td>";
    		echo "<td align='right' width='160'>"."<b>".$row["land3"]."</b></td>";
    		echo "<td align='center' width='40'>"."-"."</td>";
    		echo "<td align='left' colspan='2' width='200'>"."<b>".$row["land4"]."</b>"."</td>";
                    echo "<td>"."<a href=echo $item>"column"</a>"."</td>"."</tr>";
    		echo "</tr>";
    		echo "</table>";
    	}
    	   
    	mysql_close($cone);
    
    ?>
    Code (markup):
    Thanks in advance

    Best Regards,
    George
     
    georgege, Apr 30, 2009 IP
  2. Stylesofts

    Stylesofts Peon

    Messages:
    64
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hello there,

    What are you trying to do plz explain..the codes are not right..Plz explain and we will try to make it for you



    Regards,
    Stylesofts Developing Team
     
    Stylesofts, Apr 30, 2009 IP
  3. georgege

    georgege Greenhorn

    Messages:
    99
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #3
    Hi Stylesoft,

    I want to get from the database:
    I want to link "column" (I do to an implementation) and receive another change for each link.
    For each row is a "column" that will receive a link above ('1.php','2.php','3.php', etc.)

    I sent for you PM with link demo.

    I do not want to see my domain.

    Best Regards,
    George
     
    georgege, Apr 30, 2009 IP