如何创建重新输入密码/用户名? [英] how to create Re-enter password / Username ?

查看:88
本文介绍了如何创建重新输入密码/用户名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的新 注册页面 中,我正在尝试创建一个双重输入密码/用户名来验证他们的输入。还没决定哪一个,可能我只会用密码。什么是PHP代码? - 验证两个密码字段是否相同?在发送之前....谢谢。

In my new registration page, i''m trying to create a double entry password / username to validate their entry . haven''t decided which one, probably i''ll go just with the password . What is the PHP codes is like ?. - to validate the two password fields that it''s same ? before it sent....Thanks.

推荐答案


在我的新 注册页面 ,我正在尝试创建一个双重输入密码/用户名来验证他们的输入。还没决定哪一个,可能我只会用密码。什么是PHP代码? - 验证两个密码字段是否相同?在发送之前....谢谢。
In my new registration page, i''m trying to create a double entry password / username to validate their entry . haven''t decided which one, probably i''ll go just with the password . What is the PHP codes is like ?. - to validate the two password fields that it''s same ? before it sent....Thanks.



Javascript或者当然是Ajax,但这对你想要的东西来说可能有点复杂。

首先你想要的获取输入的名称 - 可以通过你的''submit''按钮的括号传递它们,它应该有一个onclick属性(提交按钮)来激活javascript函数。然后你会比较这两个输入的值(document.form_name.input_name.value ==等)。如果它们匹配你就有赢家,如果没有返回false并警告他们必须重新做密码。


没有时间给我写一个伪代码atm,在我出去的路上。


希望这会有所帮助。


Markus。

Javascript or of course Ajax but that''s probably a little more complicated for what you want.
First you''d want to grab the names of the input - maybe pass them through the parenthesis of your ''submit'' button, which should have an onclick attribute(the submit button) to fire the javascript function. You''d then compare the value of those two inputs (document.form_name.input_name.value == etc.) If they match you''ve got a winner, if not return false and alert them that they must re-do the passwords.

Don''t have time to write you a pseudo code atm, on my way out.

Hope this helps.

Markus.



在我的新注册页面中,我正在尝试创建一个双重输入密码/用户名来验证他们的条目。还没决定哪一个,可能我只会用密码。什么是PHP代码? - 验证两个密码字段是否相同?在发送之前....谢谢。
In my new registration page, i''m trying to create a double entry password / username to validate their entry . haven''t decided which one, probably i''ll go just with the password . What is the PHP codes is like ?. - to validate the two password fields that it''s same ? before it sent....Thanks.



Javascript或者当然是Ajax,但这对你想要的东西来说可能有点复杂。

首先你想要的获取输入的名称 - 可以通过你的''submit''按钮的括号传递它们,它应该有一个onclick属性(提交按钮)来激活javascript函数。然后你会比较这两个输入的值(document.form_name.input_name.value ==等)。如果它们匹配你就有赢家,如果没有返回false并警告他们必须重新做密码。


没有时间给我写一个伪代码atm,在我出去的路上。


希望这会有所帮助。


马库斯。

Javascript or of course Ajax but that''s probably a little more complicated for what you want.
First you''d want to grab the names of the input - maybe pass them through the parenthesis of your ''submit'' button, which should have an onclick attribute(the submit button) to fire the javascript function. You''d then compare the value of those two inputs (document.form_name.input_name.value == etc.) If they match you''ve got a winner, if not return false and alert them that they must re-do the passwords.

Don''t have time to write you a pseudo code atm, on my way out.

Hope this helps.

Markus.



最后我看到了一些亮点。但是ajax或javascript可以与PHP代码合并吗?我的意思是这个个人网站的注册页面很简单.Dun有很多字段可以填写这个表格。我的意思是我现在正在使用这样的东西,[php]

//来自我的测试文件的来源


<?php

if(空(

Finally i''m seeing some light. But can ajax or javascript merged with PHP codes ?. I mean my registration page for this personal website is simple .Dun have many fields to fill in that form. what i mean is i''m using something like this right now, [php]
// Source from my test file

<?php
if (empty(


_POST [''emailAddress'']))

{
_POST[''emailAddress'']))
{


这篇关于如何创建重新输入密码/用户名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆