GetAFreelancer.com
 
Find projectsSearch
Sign Up | Log in | Top Rated Users | Browse projects | Post Project | RSS feeds | Articles
 

Check Input Function Written In PHP

   Click here to post similar project

Check Input Function Written In PHP is project number 186536 posted at GetAFreelancer.com. Click here to post your own project.

Closed
(Selected Service Provider maridari)
Status: Closed
Budget: $30-100
Created: 10/16/2007 at 13:50 EDT
Bidding Ends: 10/23/2007 at 13:50 EDT
Project Creator: jstorm13 View PM Post PM
Buyer Rating: 10.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/10
(4 reviews)
Description: 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.

Report violation
Job Type:
  • PHP
Database: MySQL
Operating system: Linux
Bid count: 5
Average bid: $ 30

 

Related project
 
Nonpublic project #293292 Featured Nonpublic
login to view
 

FREE Trial project for new buyers!

 

View Project Message Board     Post Message on Project Message Board
Messages Posted: 0

If you are the project creator or one of the bidders Log in as project creator or bidder for more options

Bid on This Project

Service Providers PMB Bid Delivery Within Time of Bid Provider Rating
NickolaS
View PM Post PM
$ 30 0 days 10-16-2007 14:01 9.96/109.96/109.96/109.96/109.96/109.96/109.96/109.96/109.96/109.96/10
(337 reviews)
Hi, please, check your PM
maridari
View PM Post PM
$ 30 0 days 10-16-2007 13:57 9.84/109.84/109.84/109.84/109.84/109.84/109.84/109.84/109.84/109.84/10
(25 reviews)
Hello, please check PM. thanks
nkhuynh
View PM Post PM
$ 30 0 days 10-16-2007 14:00 9.56/109.56/109.56/109.56/109.56/109.56/109.56/109.56/109.56/109.56/10
(25 reviews)
Hello sir, please check PMB right now, it's so easy with me, thank you.
wedge
View PM Post PM
$ 30 0 days 10-16-2007 14:05 10.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/10
(3 reviews)
Please check PM
tejasrane
View PM Post PM
$ 30 0 days 10-16-2007 14:10 (No Feedback Yet)
Ill give the Code the Moment this project is closed.
Bid on This Project

 

[ Website Design ] [ Outsourcing ] [ Freelance ] [ Post Project Free ]

What is GetAFreelancer.com? ( Read about the company )

We provide a safe escrow environment and you don't release the money until project is completed. We have thousands of satisfied clients around the world. Web Development doesn't have to be expensive. Outsourcing will cut your expenses by more than 50%.

Outsource projects and save a lot of money. Getting affordable freelance work, freelance programming and custom web design done for your website has never been easier. Companies of any size have used our web services. GetAFreelancer.com is one of the largest sites of its kind. We have earned a good reputation and you can trust us.

Find Webmaster Resources and Webmaster Forum. Take a look at Search Engine Submission.