PHP API Extensions

Create extensions to a simple PHP API script

a. create two methods, the first being /user and /user/1, and the second being /account and /account/2. The will help us see how you break up the url to control the flow and also help us to create our own additional methods

b. create some code that would allow us to connect to a mysql database and inside the relevant functions for the methods above, call the database for data. We know how to code up a connection to a database and retrieve info but we dont know how to do it in a way without creating a new database connection inside each function (i.e. we dont know how to make a global variable for accessing the database)

The code wouldnt need to connect to an acutal database, maybe just include placeholder code for the connection details and then some commented code for the select statements (where you currently have the hard code user data)

In summary it would have four methods





.. and some placeholder code for where we connect to a database.

Skills: PHP

See more: php and mysql connection, how to code php, create php code, php api extensions, php create function, extensions, data api, API connection, php connection, mysql api, php connection select, database connection php, php connect, php call flow, retrieve url, call url script, php connect mysql, connection php mysql, php global variable, mysql variable help, php url api, php connect database, flow methods, script call url, php help function

About the Employer:
( 27 reviews ) Riverview, Australia

Project ID: #1127234

Awarded to:


Ready to start, please check PM, Thanks.

$75 USD in 1 day
(26 Reviews)

3 freelancers are bidding on average $142 for this job


Hello, 10+ years exp full time freelancer here, can deliver a quality & professional work in the timeframe posted. Please contact me via PM for any question, Thanks.

$100 USD in 2 days
(42 Reviews)

Hello Sir , ########## plz check your PMB ########## Thanks

$250 USD in 10 days
(6 Reviews)