In Progress

PHP Script To Insert Data Into MYSQL Database

I want a php script that automatically adds data to my database from an api response (I already set the api response up)

here is what I currently have...

I basically just need it to automatically add data to database.

<?php

//connect to mysql db

$con = mysql_connect("myip","user","pw") or die('Could not connect: ' . mysql_error());

//connect to the employee database

mysql_select_db("dbname", $con);

//read the json file contents

$data = file_get_contents('http://urloffileconents/');

//convert json object to php associative array

//$data = json_decode($jsondata, true);

//

//get the employee details

$id = $data['customColumns']['totals'];

$name = $data['advertiserCost'];

$sql = "INSERT INTO db(another, one)

VALUES('$id', '$name')";

if(!mysql_query($sql,$con))

{

die('Error : ' . mysql_error());

}

?>

Skills: MySQL, PHP

See more: mysql database data matching, mysql database data xml feed, simple iphone app mysql database data, mysql database data collection, update mysql database data email, transfer mysql database data wordpress, mysql inserting data install script, copy mysql database data, fill mysql database data form, mysql database real estate script

About the Employer:
( 9 reviews ) Miami, United States

Project ID: #8988297

Awarded to:

Torricelli

Hi, i hope you're doing well. I've just read your project's description and i would like to help you with it. I'm an experienced web developer with the necessary skills for getting this job done. Responsibilit More

$25 USD / hour
(47 Reviews)
4.7

35 freelancers are bidding on average $29/hour for this job

kchg

Hello, I can do it shortly. More

$38 USD / hour
(309 Reviews)
8.9
seekdeveloper

Hi, I have read your post and understood your requirement. I have great experience in handling /PHP/MySQL/HTML5/jQuery/Wordpress/Magento/Joomla/Drupal/AngularJS/[url removed, login to view] More

$25 USD / hour
(84 Reviews)
8.2
krishdts

Greetings, This is Kris from DreamzTechUSA. Please open the chat room so we can discuss this in details. To get an idea of the quality of our work you can check the below link : [url removed, login to view] More

$33 USD / hour
(85 Reviews)
8.3
gslogics123

Hello Sir I can do this right away. Please check my profile for work and experience. Regards Ashwin

$26 USD / hour
(260 Reviews)
7.4
sureshdevi

I can create php script to insert data into mysql database from API response. I will complete this work in next few hours. Looking for your reply to start this work immediately.

$25 USD / hour
(866 Reviews)
7.7
searchtechnow

we are ready to start the work now. looking forward to hear from you.

$26 USD / hour
(206 Reviews)
7.5
vphat28

Hi I can modify your script right now to add data to database . I will need database connection information , access to database. Allow me to handle this for you.

$25 USD / hour
(142 Reviews)
6.8
weonlydo

Hi, I have a bit of spare time on my hands now. Let's do this. Your script looks almost correct, it must be specific field names and mapping between JSON -> MySQL table that you are having trouble with. Happy to star More

$26 USD / hour
(63 Reviews)
6.1
freeworks

Hi, We are having 12 years experience in logo designing, web designing and [url removed, login to view] are expertise in PHP,WP,HTML5 . Please check our reviews and samples. I have lot of experience in PHP and JSON parser. P More

$27 USD / hour
(84 Reviews)
6.4
stdhtelkom

Hello, I am very interested. I am very sure can help you completely and deliver the best for you. Thanks and all the best, Steve

$27 USD / hour
(25 Reviews)
6.0
Wangxianming

[url removed, login to view]'s me you are finding for. I have read your project with great care and I am sure I can do a perfect job for you. I have a experience in this side. If you hire me , I can provide top quality within your timelin More

$39 USD / hour
(6 Reviews)
6.0
Chtioui86

Hi , I am expert web developer , i can do your script fast and in professional way . Price/Time will depend on detail I can start right now No payment until i finish your work . This My-sk-pe : [url removed, login to view] More

$39 USD / hour
(77 Reviews)
6.1
sunnysmile911

Hi I have rich experience with web development. I built following websites. [url removed, login to view] [url removed, login to view] [url removed, login to view] If you give me the chance to do this, I'll do m More

$31 USD / hour
(11 Reviews)
5.3
kevalthacker

Dear Hiring Manager, How are you? I am able to do this work. I have more than 3 years of experience in PHP,MySQL. I am ready to start right now. Thank you. Regards, Keval Thacker

$32 USD / hour
(77 Reviews)
5.0
solafort

Hi. I am a skillful and talented PHP developer. I have more than 5 years experience in PHP/Mysql/Apache. I have proficient HTML/Javascript/HTML5/CSS/Bootstrap/jQuery/AngularJS skills too. If you want to check m More

$26 USD / hour
(10 Reviews)
4.5
MrMSparrow

A proposal has not yet been provided

$26 USD / hour
(2 Reviews)
4.0
soulaimaneh

Hello sir I am interested in this project i have 3 years experience in PHP/MYSQL framework codeigniter cakephp javascript JQUERY jquery ui ajax i can help you ready to start

$25 USD / hour
(8 Reviews)
4.1
saraca29n0v

A proposal has not yet been provided

$33 USD / hour
(5 Reviews)
3.9
workforyou17

Hi, I think you can put that script into cron or you can try it in loop. Ready to help you to implement it Regards

$25 USD / hour
(32 Reviews)
3.7
rodweb

Aucune proposition n'a encore été fournie.

$25 USD / hour
(11 Reviews)
3.2