0

私のコード:

  <?php include ($_SERVER['DOCUMENT_ROOT'].'/functions/functions.php');?>
    <div id="hasJavaScript">
    <form name="signup">
        <label>Username</label> <input type="text" name="user_temp" size=32 maxlength=32><span>alphanumeric, no spaces</span><br>
        <label>Type password</label> <input type="password" name="pass_temp1" size=32 maxlength=32><span>alphanumeric, 8-12 long</span><br>
        <label>Retype password</label> <input type="password" name="pass_temp2" size=32 maxlength=32><br>
        <label>Email</label> <input type="text" name="email_temp" size=32 maxlength=32><br>
        <label> What is: </label><?php $captchaArray = myCaptcha(); echo $captchaArray['equation'];?><br>
        <label>Answer</label><input type="text" name="answer1">
        <input onClick="passResponse(); return false;" type="submit" name="submitbtn" value="Signup Now">
    </form>

    <form action="/action/signup-action.php" METHOD="POST" name="hform">
            <input type="hidden" name="sSecureUser">
            <input type="hidden" name="sSecurePass1">
            <input type="hidden" name="sSecurePass2">
            <input type="hidden" name="secureEmail">
            <input type="hidden" name="answer2">
            <input type="hidden" name="checker" value=".<?php echo $captchaArray['answer'];?> .">
    </form>
    </div>

    <noscript>
    <div id="noscript">
    <form method="POST" action="/action/signup-action.php" name="signup">   
        <label>Username</label> <input type="text" name="sNakedUser"><span>alphanumeric, no spaces</span><br>
        <label>Type password</label> <input type="password" name="sNakedPass1"><span>alphanumeric, 8-12 long</span><br>
        <label>Retype password</label> <input type="password" name="sNakedPass2"><br>
        <label>Email</label> <input type="text" name="nakedEmail"><br>
        <input onClick="passResponse(); return false;" type="submit" name="submitbtn" value="Signup Now">
    </form>
    </div>
    </noscript>
    <title>Sign Up Form</title>
    <script language="javascript" src="/js/md5.js"></script>
    <script language="javascript">
    <!--
    document.getElementById('hasJavaScript').style.display = 'block';

  function passResponse() {
document.hform.sSecureUser.value = MD5(document.signup.user_temp.value);
document.hform.sSecurePass1.value = MD5(document.signup.pass_temp1.value);
document.signup.pass_temp1.value = "";
document.hform.sSecurePass2.value = MD5(document.signup.pass_temp2.value);
document.signup.pass_temp2.value = "";
document.hform.secureEmail.value = MD5(document.signup.email_temp.value);
document.hform.answer2.value = document.signup.answer1.value;
document.signup.answer1.value = "";
document.hform.submit();

}
    // -->
    </script>

私の問題:

私が追加するまで、コードは正常に機能していました:

<label> What is: </label><?php $captchaArray = myCaptcha(); echo $captchaArray['equation'];?><br>
    <label>Answer</label><input type="text" name="answer">

 <input type="hidden" name="answer">
        <input type="hidden" name="checker" value=".<?php echo $captchaArray['answer'];?> ."> 

document.hform.answer2.value = document.signup.answer1.value;
document.signup.answer1.value = "";

...これらの行を削除しても、「TypeError: document.hform.sSecureUser is undefined」というエラーが表示されます

私のURLは、壊れたときにこれを返しています:

http://localhost/?user_temp=aaa&pass_temp1=aaa&pass_temp2=aaa&email_temp=aaa&answer1=1&submitbtn=Signup+Now
4

0 に答える 0