怎么实现手机或邮箱注册

WBOY
Release: 2016-06-13 13:16:36
Original
1225 people have browsed it

如何实现手机或邮箱注册?
在一个文本框中,如何实现手机或邮箱注册?

------解决方案--------------------
这个就涉及到了API接口了、
 手机注册:
 你得利用 手机短信的接口 发送一条验证码、 然后在该文本框内判断该验证码是否正确
 邮箱注册:
 发送一个邮件给该邮箱、操作人操作点击链接 、实现注册、

 
 总的来说 难点在于找api接口、

 手机短信的我知道个 中国网建(百度搜索下吧、然后他有提供如何调用、好像免费测试5条短信)
 邮件的你随便找个开发api的邮箱吧、
 
------解决方案--------------------

PHP code
if(is_numeric($_POST['name'])){
         $sql="insert into user(id,email,tel) values('','','{$_POST['name']}') " ;  //手机
}else{
        $sql="insert into user(id,email,tel) values('','{$_POST['name']}','') " ;  //邮箱
}
mysql_query($sql); <div class="clear">
                 
              
              
        
            </div>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!