Check Input Function Written In PHP

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


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.


Just ask if there is something about this project that you do not understand.

Beceriler: PHP

Daha fazlasını gör: checkinput php, function check php, checkinput function, check input php, php checkinput, check input function, php check input, php check input function, php check input type, check input function php, what is data input, use case types, type of use case, string b, php string to html, php description, php checked checked, not valid email address, not a valid email address, make written, i will check this out, in php, email address not valid, email address is not valid, cover email

İşveren Hakkında:
( 18 değerlendirme ) Richmond, United States

Proje NO: #186536



Hello, please check PM. thanks

%selectedBids___i_period_sub_7% gün içinde 30%project_currencyDetails_sign_sub_9% %project_currencyDetails_code_sub_10%
(20 Değerlendirme)

Bu iş için 5 freelancer ortalamada $30 teklif veriyor


Hi, please, check your PM

in %bids___i_period_sub_35% gün içinde30%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(327 Değerlendirme)

Hello sir, please check PMB right now, it's so easy with me, thank you.

in %bids___i_period_sub_35% gün içinde30%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(176 Değerlendirme)

Please check PM

in %bids___i_period_sub_35% gün içinde30%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)

Ill give the Code the Moment this project is closed.

in %bids___i_period_sub_35% gün içinde30%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)