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

# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_conn = "";
$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"); 

<?php require_once('../config/conn.php'); 
$sql="SELECT * FROM roombooking";
$row_rs = mysql_fetch_assoc($rs);
<meta charset="utf-8">
<link href="../css/master.css" rel="stylesheet" type="text/css" media="screen">


     <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>  
    <div id="content">
    <div id="mainContent">
    <section id="intro">
    <article class="blogPost">
    <table border="0">
    <?php do { ?>
    <?php echo $row_rs['roomID']; ?>
     <?php printf('<a href="action/roomDetail.php?roomID=%s">詳情</a>',$row_rs['roomID']);
    <?php printf('<a href="del_room.php?roomID=%s">取消預約</a>',$row_rs['roomID']);
    <?php }while ($row_rs = mysql_fetch_assoc($rs));?>
    <form name="logoutForm" method="post" action="../source/logout.php">
    <input type="submit" name="logout" id="logput" value="Logout">
    <li><a href="roomManagement.php">預約房間</a></li>  
    <li><a href="room.php">已訂房間</a></li>   
    <p>Copyright © 2010-2011 長洲浸信會,Cheung Chau Baptist Church 版權所有</p>

Recommended Answers

All 3 Replies

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.