dptiq46022 2019-07-26 16:50
浏览 58
已采纳

密码框自更新到PHP 7后不显示[关闭]

My web hosting have now decided to use PHP 7 and I'm having issues with some of my pages , managed to fix most but this one is a head scratcher for me. The password box doesn't show but the others box in the same page do? so I can't type the password to register

I've noticed the height is defined differently and not sure how to get around it if this is the issue

<?PHP
require_once("./include/membersite_config.php");

if(isset($_POST['submitted']))
{
   if($fgmembersite->RegisterUser())
   {
        $fgmembersite->RedirectToURL("thank-you.html");
   }
}

?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">

  <head>
    <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
    <title>Contact us</title>
    <link rel="STYLESHEET" type="text/css" href="style/fg_membersite.css" />
    <script type='text/javascript' src='scripts/gen_validatorv31.js'></script>
    <link rel="STYLESHEET" type="text/css" href="style/pwdwidget.css" />
    <script src="scripts/pwdwidget.js" type="text/javascript"></script>
  </head>

  <body>

    <!-- Form Code Start -->
    <div id='fg_membersite'>
      <form id='register' action='<?php echo $fgmembersite->GetSelfScript(); ?>' method='post' accept-charset='UTF-8'>
        <fieldset>
          <legend>Register</legend>

          <input type='hidden' name='submitted' id='submitted' value='1' />

          <div class='short_explanation'>* required fields</div>
          <input type='text' class='spmhidip' name='<?php echo $fgmembersite->GetSpamTrapInputName(); ?>' />

          <div><span class='error'><?php echo $fgmembersite->GetErrorMessage(); ?></span></div>
          <div class='container'>
            <label for='name'>Your Full Name*: </label><br/>
            <input type='text' name='name' id='name' value='<?php echo $fgmembersite->SafeDisplay(' name ') ?>' maxlength="50" /><br/>
            <span id='register_name_errorloc' class='error'></span>
          </div>
          <div class='container'>
            <label for='email'>Email Address*:</label><br/>
            <input type='text' name='email' id='email' value='<?php echo $fgmembersite->SafeDisplay(' email ') ?>' maxlength="50" /><br/>
            <span id='register_email_errorloc' class='error'></span>
          </div>
          <div class='container'>
            <label for='username'>UserName*:</label><br/>
            <input type='text' name='username' id='username' value='<?php echo $fgmembersite->SafeDisplay(' username ') ?>' maxlength="50" /><br/>
            <span id='register_username_errorloc' class='error'></span>
          </div>
          <div class='container' style='height:80px;'>
            <label for='password'>Password*:</label><br/>
            <div class='pwdwidgetdiv' id='thepwddiv'></div>
            <noscript>
    <input type='password' name='password' id='password' maxlength="50" />
    </noscript>
            <div id='register_password_errorloc' class='error' style='clear:both'></div>
          </div>

          <div class='container'>
            <input type='submit' name='Submit' value='Submit' />
          </div>

        </fieldset>
      </form>
      <!-- client-side Form Validations:
Uses the excellent form validation script from JavaScript-coder.com-->

      <script type='text/javascript'>
        // <![CDATA[
        var pwdwidget = new PasswordWidget('thepwddiv', 'password');
        pwdwidget.MakePWDWidget();

        var frmvalidator = new Validator("register");
        frmvalidator.EnableOnPageErrorDisplay();
        frmvalidator.EnableMsgsTogether();
        frmvalidator.addValidation("name", "req", "Please provide your name");

        frmvalidator.addValidation("email", "req", "Please provide your email address");

        frmvalidator.addValidation("email", "email", "Please provide a valid email address");

        frmvalidator.addValidation("username", "req", "Please provide a username");

        frmvalidator.addValidation("password", "req", "Please provide a password");

        // ]]>
      </script>

      <!--
Form Code End (see html-form-guide.com for more info.)
-->

  </body>

  </html>

</div>
  • 写回答

1条回答 默认 最新

  • dongnachuang6635 2019-07-26 17:24
    关注

    The issue has nothing to do with your PHP upgrade. The password field is wrapped in a <noscript> tag which will hide the content unless scripts are turned off.

    https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript

    Remove the <noscript> tag and the input will be displayed.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效