我知道还有很多其他这样的问题,我在网上找到了1.000个答案,但这些都与我的代码无关:(
那么有人可以帮我提交后如何保持电子邮件的价值吗?

        <form name="login-registration" onSubmit="return validateForm()" method="post" action="" >
            <label>Email</label>
            <input type="email" name="emailinput" id="emailinput" value ="" />
            <p id="emptyEmail" class="hidden">Email field is required</p>
            <p id="invalidEmail" class="hidden">Email you insert is invalid!</p>
            <label>Your password</label>
            <input type="password" name="pswinput" id="pswinput" value=""/>
            <p id="pswMinMax" class="hidden">Password should be from 4 to 8 caracters</p>
            <p id="pswLettNum" class="hidden">Password should be letters and numbers. No special caracters are allow</p>
            <label>Repeat password</label>
            <input type="password" name="pswrepeatinput" id="pswrepeatinput" value="" onblur="isValidPswRep()"/>
            <p id="pswR" class="hidden">Your passwords is different</p>
            <input type="checkbox" id="policy" name="policy" value="policy" /> <label>I agree</label>
            <p id="checkN" class="hidden">You must agree to our term</p>

            <input type="submit" name="submit" value="Login" />

        </form>


我尝试放入一些代码,例如:

<input type="email" name="emailinput" id="emailinput" value = "<?php echo htmlspecialchars($_GET['lastname']); ?>" />


但是,该php行仅显示在字段输入中。

最佳答案

尝试使用$_POST['lastname']代替$_GET['lastname']

10-08 08:12
查看更多