My codes work in localhost but this error happens when I upload to a web site.

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_conn = "mysql4.000webhost.com";
$database_conn = "a3027257_ccbc";
$username_conn = "a3027257_ccbc";
$password_conn = "a123456";
$conn = mysql_pconnect($hostname_conn, $username_conn, $password_conn) or trigger_error(mysql_error(),E_USER_ERROR);

mysql_select_db($database_conn, $conn) or die("cannot select Database");

  mysql_query("SET NAMES 'UTF8'");
  mysql_query("SET CHARACTER SET UTF8"); 
  mysql_query("SET CHARACTER_SET_RESULTS=UTF8");
?>

<? 
session_start();
if(!session_is_registered(myusername)){
header("location:../index.php");
}
?>
<?php require_once('../config/conn.php'); 
$sql="SELECT * FROM roombooking";
$rs=mysql_query($sql,$conn);
$row_rs = mysql_fetch_assoc($rs);
$count=mysql_num_rows($rs);
?><!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>職員控制中心</title>
<link href="../css/master.css" rel="stylesheet" type="text/css" media="screen">

</head>

<body>
	<header>
		<h1>職員控制中心</h1>
	</header>
    <nav>
     <ul>
     <li><a href="s_home.php">會員管理</a></li>
     <li><a href="postManagement.php">文章管理</a></li>
     <li><a href="newMen.php">消息管理</a></li>
     <li><a href="activityManagement.php">活動管理</a></li>
     <li><a href="fileManagement.php">檔案管理</a></li>
     <li class="selected"><a href="roomManagement.php">房間資源</a></li>  
     </ul>
    </nav>
    <div id="content">
    <div id="mainContent">
    <section id="intro">
           <header>
        <h2>職員控制中心</h2>
      </header>
    </section>
    <section>
    <article class="blogPost">
    <header>
    <h2>已訂房間</h2>
    </header>
    <table border="0">
    <?php do { ?>
    <tr>
    <td>
    <?php echo $row_rs['roomID']; ?>
    </td>
    <td>
     <?php printf('<a href="action/roomDetail.php?roomID=%s">詳情</a>',$row_rs['roomID']);
	?>
    </td>
    <td>
    <?php printf('<a href="del_room.php?roomID=%s">取消預約</a>',$row_rs['roomID']);
	?>
    </td>
    </tr>
    <?php }while ($row_rs = mysql_fetch_assoc($rs));?>
    </table>
    </article>
    </section>
    </div>
    <aside>
    <section>
    <form name="logoutForm" method="post" action="../source/logout.php">
    <input type="submit" name="logout" id="logput" value="Logout">
    </form>
    </section>
    <section>  
    <header>
    <h3>房間管理</h3>
    </header>
    <ul>
    <li><a href="roomManagement.php">預約房間</a></li>  
    <li><a href="room.php">已訂房間</a></li>   
    </ul>
    </section>        
    </aside>
    </div>
 <footer>
    <p>Copyright © 2010-2011 長洲浸信會,Cheung Chau Baptist Church 版權所有</p>
  </footer>      
</body>
</html>

First read the sticky thread on top of this forum.

Too many English words

commented: Were you expecting Chinese? -1

Please use code-tags. No one likes reading code in plain text.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.