2013-05-01 162 views
0

我正在Dreamweaver中创建一个注册表单,这个表单出现在Dreamweaver中,但是当我尝试将它发送到远程服务器时,浏览器不显示所有注册字段。php +注册表单不在远程服务器上显示

任何人都可以帮我吗?

到现在为止的代码是没有数据库

在浏览器中注册页面显示的前四个字段

register.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>RegisterPage</title> 

<link href='http://fonts.googleapis.com/css?family=Oswald:400,300' rel='stylesheet' type='text/css' /> 
<link href='http://fonts.googleapis.com/css?family=Abel|Satisfy' rel='stylesheet' type='text/css' /> 
<link href="default.css" rel="stylesheet" type="text/css" media="all" /><style type="text/css"> 
.Required-field { 
    background-color: #F00; 
} 
.required-fields { 
    color: #FF0000; 
} 
</style> 

<script type="text/javascript" src="../js/jquery.js"></script> 

</head> 

<body> 
<div id="banner"> 
    <div id="header-wrapper"> 
    <div id="header"> 

    </div> 
    </div> 
</div> 

    <div id="wrapper"> 
    <div id="page-wrapper"> 
     <div id="page"> 
      <div id="wide-content"> 

        <h2 class="registerTitle">Registration Fields</h2> 
        <h3 class="registerTitle">Sign Up Today....</h3> 
        <br /><br /> 
<br /> 
<br /> 
<br /> 
        <!--registration fields--> 
        <form id="registerform" action="register.php" method="post"> 

    first name<span class="required-fields">*</span><br /> 
    <input type="text" name="fname" placeholder="Firstname" /><br /><br /> 
    last name<span class="required-fields">*</span><br /> 
    <input type="text" name="lname" placeholder="Lastname" /> 
    <br /> <br /> 
    Date of Birth<br /> 
    <input type="date" name="birthdate" value= "YYYY_MM_DD" onfocus="if (this.value == 'YYYY_MM_DD') {this.value = '';}" onblur="if (this.value == '') {this.value = 'YYYY_MM_DD';}" /><br /><br /> 
     Specialization:<span class="required-fields">*</span><br /> 
     <select name="specialization" class="select"> 
     <option value="0">-- Select Your Specialization --</option> 

     <?php specializationQuery(); ?> 
     </select> 
     <br /> <br /> 
     <!-- 
     Governorate<span class="required-fields">*</span><br /> 
     <select id="governorate" name = 'governorate'> 
       <?php echo $opt->ShowGovernorate(); ?> 
       </select><br /><br /> 

     District<span class="required-fields">*</span><br /> 
     <select id="district" name="district"> 
        <option value="0">choose...</option> 
       </select><br /><br /> 
     Village<span class="required-fields">*</span><br /> 
     <select id="village" name="village"> 
        <option value="0">choose...</option> 
       </select> 
     <br /> <br /> 
     -->   
     Email:<span class="required-fields">*</span><br /> 
     <input type="text" name="email" placeholder="Email Adress" /><br /><br />   
     Username:<span class="required-fields">*</span><br /> 
     <input type="text" name="username" placeholder="Username" /> 
     <br /><br /> 
     Password:<span class="required-fields">*</span><br /> 
     <input type="password" name="pass1" placeholder="Password" /><br /><br /> 
     Re_Password:<span class="required-fields">*</span><br /> 
     <input type="password" name="pass2" placeholder="Validate Password" /> 
     <br /><br />  
    <input type="submit" value="Register"/> 
    </form> 
        <!--end of registration fields--> 


      </div> 
     </div> 
    </div> 
</div> 

    <div id="footer-bg"> 
    <div id="footer-content" class="container"> 
    <div id="column3"> 
      <h2>About Us</h2> 
      <ul class="style1"> 
       <li class="first">Lam El Chamel is the first web development system for me, this system had allow me to expand my knowledge and had put me in the first step of the programming career. 

      Hope that this system will respnd for user's requirements, and as each system it will have a future enhancment with taking into consideration users feedback in the feedback section. 
       </li> 
      </ul> 
     </div> 
     <div id="column4"> 
      <h2>Navigation</h2> 
      <ul class="style1"> 
       <li class="first"><a href="#">Home</a></li> 
       <li><a href="#">Map</a></li> 
       <li><a href="#">Feedback</a></li> 
       <li><a href="#">Search</a></li> 
       <li><a href="#">Help</a></li> 
      </ul> 
     </div> 
    </div> 
</div> 
<div id="footer" class="container"> 
    <p>Copyright (c) 2013 Lam_El_Chamel.zxq.net All rights reserved. Design by Georges Matta. 
</div> 
</body> 
</html> 
+0

请注意您的HTML无效(http://validator.w3.org/check)。也可能导致某些字段在某些浏览器上不显示。 – Aleph 2013-05-01 08:17:47

回答

0

你有问题,这两个功能

<?php specializationQuery(); ?> 

and

<?php echo $opt->ShowGovernorate(); ?> 

尝试评论他们这样

<?php //specializationQuery(); ?> 
<?php //echo $opt->ShowGovernorate(); ?> 

,然后使用它,它会显示所有字段。

+0

谢谢我是一个错误谢谢它显示所有领域先生我有一个问题这是我第一次,我使用远程服务器我如何将这个远程服务器与我在phpmyadmin创建的数据库? (我之前在本地主机上工作) – user2338686 2013-05-01 08:15:52

+0

如果您具有与本地相同的数据库及其表远程服务器,则可以轻松使用指向远程服务器主机及其数据库名称的mysql_connect函数。 – 2013-05-01 08:18:44

+0

@chandresh_cool使用PDO而不是mysql_connect – Aleph 2013-05-01 08:19:30