Not displaying proper

Discussion in 'Programming' started by lambofgod, Apr 5, 2009.

  1. #1
    Hi, i have two scripts where everything is almost set up like i want it, but there seems to be a small problem.

    whenever i upload a file, it doesn't display on the page i set it to which is http://www.dangmn.net/tgl/display_reps.php nor does it upload into the dictionary i set it to which is "upload" under my host. any ideas why? here is the script.

    display_rep.php
    <?php
    
    session_start();     //note session here
    //set local variables
    http://www.codingforums.com/editpost.php?do=editpost&p=802321
    $dbhost = "xxxxx"; 
    $dbuser = "xxxxxx"; 
    $dbpass = "xxxxx"; 
    $dbname = "xxxxx"; 
    
    //connect 
    $db = mysql_connect($dbhost,$dbuser,$dbpass); 
    mysql_select_db("$dbname",$db); 
    
        
    if (!$db)
      {
      die('Could not connect: ' . mysql_error());
      }
    
    
    $db = mysql_connect($dbhost,$dbuser,$dbpass);mysql_select_db("$dbname",$db); 
    
    if (!db_selected)
    {
    
    die("cant connect");
    
    }
    
    $result = mysql_query("SELECT replay FROM test");
    
    echo "<table align='center' width='30%' bgcolor='#FFFFFF' style='border-color:#000;border-style:solid; border-width:1px' border=0>
    <tr>
    <th><FONT COLOR='#000'>Replay</th>
    </tr>";
    
    
    while($row = mysql_fetch_array($result))
      {
      
      echo "<tr>";
      echo "<td ALIGN='CENTER'><FONT COLOR='#000000'>" . $row['replay'] . "</td>";
      echo "</tr>";
       }
      
    echo "</table>";
    
    mysql_close($db);
    
    ?> 
    PHP:
     
    lambofgod, Apr 5, 2009 IP