Find Jobs
Hire Freelancers

Check Input Function Written In PHP

$30-100 USD

进行中
已发布超过 16 年前

$30-100 USD

货到付款
Please ONLY bid if you know what a function is: I need someone to write a function in PHP. My website allows users to enter and change data. They can change their password, description, etc. So I will need a function to check their input to make sure they do not try to put in harmful code. I will call this function as follows: $result = checkinput($string, $type); The $string is the string to be checked and $type is the type of this string. There can be 4 different types of strings. You might want to use a switch statement inside this function to handle the different types. The types I need this function to handle: 1. password: (this string can only be alpha numeric from 3 to 15 characters long, return error if bad) 2. email: (just check to make sure this appears to be a valid email address, we don't really have to validate it. error if bad) 3. url link: (only allow what has to be in a url link, and just error if something else is here that should not be. also return the leading http:// in case they don't have this in their string) 4. description: (this covers everything else. i don't want any code in this that might be harmful such as html, php, java etc. you might want to just cover the things that we allow rather than what we dont. we do want to allow certain characters like ' & / and others needed for description, etc.) On the description you can just take out what we don't allow and leave the rest. Example: Hello, I have been very <b>busy</b> today. function returns: Hello, I have been very busy today. If you do need to return an error return the following in the $string. 'ERRBDSTR' Just ask if there is something about this project that you do not understand.
项目 ID: 186536

关于此项目

5提案
远程项目
活跃17 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
颁发给:
用户头像
Hello, please check PM. thanks
$30 USD 在0天之内
4.9 (20条评论)
5.8
5.8
5威客以平均价$30 USD来参与此工作竞价
用户头像
Hi, please, check your PM
$30 USD 在0天之内
5.0 (327条评论)
7.4
7.4
用户头像
Hello sir, please check PMB right now, it's so easy with me, thank you.
$30 USD 在0天之内
4.9 (176条评论)
6.4
6.4
用户头像
Please check PM
$30 USD 在0天之内
0.0 (0条评论)
0.0
0.0
用户头像
Ill give the Code the Moment this project is closed.
$30 USD 在0天之内
0.0 (0条评论)
0.0
0.0

关于客户

UNITED STATES的国旗
Richmond, United States
5.0
18
会员自10月 10, 2007起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。