PHP Page and Mysql data R/W

Dear guys,
I'm starting to work on an intrest project which will (hopefully) be installed as monitoring system on solar panel installation.
as first step we would like to simply monitoring analog datas, then the second step shuld be defined in ordr to remotely control several features via digital output.

let's go to my problem:
I've created a PHP page which allow me, using an URL string, to upload value to my local MySql database.
everything is working fine when the PHP page is running on my local computer (i'm using Xampp)

then I've tried to move the PHP page into the arduino SD card, changing on the PHP code the information of my database location:
From "localhost" to my machine name or IP address

My Yun is already configured for PHP reading, but unfortunately, simulating my GET string not on the localhost but on the PHP file located to the arduino SD, nothing is working.

I receive the following error, line 35 is the one the should establish the database connection....

Fatal error: Call to undefined function mysql_connect() in /mnt/sda1/arduino/www/solarduino/upload_value.php on line 35

Thanks in advance for any suggestion or comment!

Regards
Daniele

Php Send Yun sensor data to MySQL on external server

http://forum.arduino.cc/index.php?topic=239575.msg1720142#msg1720142

Hi Sonnyyu,
thanks for your fast reply.

i've already read that post but unfortunately seems to be not meeting my needs.

So I don't need to run any SQL database on the YUn side, what I want to do is send a Get string to a PHP page located on Web, (www.website.com/upload_value.php).

Actually the PHP file is located on my computer.

If i type in the URL of any web browser the designed string, my PHP file correctly do the job, so insert the data on the string into the database.

But when i try to send the string in my loop with:
client.print("GET http://computer_IP/file location/upload_value.php?input1=xxx&input2=xxx&input3=xxx"
i don't get any result....

printing the string in the serial monitor it looks ok.

Do you have any other suggestion?

thanks
Daniele

nano /mnt/sda1/url.py
#!/usr/bin/python
import requests
import sys
url = "http://computer_IP/file_location/upload_value.php?input1="
url += sys.argv[1]
url += "&input2="
url += sys.argv[2]
url += "&input3="
url += sys.argv[3]
print url
r = requests.get(url)
print r.status_code
print r.headers
print r.content
chmod 755 /mnt/sda1/url.py

Testing by insert data into Mysql:

/mnt/sda1/url.py 1 2 3

Arduino code:

http://forum.arduino.cc/index.php?topic=293188.msg2050304#msg2050304

In PHP favor:

opkg update
opkg install php5-cli
nano /mnt/sda1/url.php
#!/usr/bin/php-cli
<?php
$url= 'http://computer_IP/file_location/upload_value.php?input1='.$argv[1].'&input2='.$argv[2].'&input3='.$argv[3];
$response = http_get($url, array("timeout"=>1), $info);
print_r($info);
?>
chmod 755 /mnt/sda1/url.php
/mnt/sda1/url.php 1 2 3