summaryrefslogtreecommitdiffstats
path: root/Under-Testing/Website/insertdevice.php
diff options
context:
space:
mode:
authorgsmselftest2011-11-16 18:06:02 +0100
committergsmselftest2011-11-16 18:06:02 +0100
commit8a7755d6f96e599fe75ac8e5e1c6994138f4b99e (patch)
tree9b320feb695cfbadd605808b2db5795e240e9399 /Under-Testing/Website/insertdevice.php
parent delete dummy comment (diff)
downloadgsm-selftest-8a7755d6f96e599fe75ac8e5e1c6994138f4b99e.tar.gz
gsm-selftest-8a7755d6f96e599fe75ac8e5e1c6994138f4b99e.tar.xz
gsm-selftest-8a7755d6f96e599fe75ac8e5e1c6994138f4b99e.zip
under Testing folder
Diffstat (limited to 'Under-Testing/Website/insertdevice.php')
-rw-r--r--Under-Testing/Website/insertdevice.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/Under-Testing/Website/insertdevice.php b/Under-Testing/Website/insertdevice.php
new file mode 100644
index 0000000..7875891
--- /dev/null
+++ b/Under-Testing/Website/insertdevice.php
@@ -0,0 +1,28 @@
+<?php
+include 'dbconnection.php';
+
+$db = mysql_connect($dbhost,$dbuser,$dbpass);
+mysql_select_db($dbname,$db);
+
+$link = $db;
+if (!$link) {
+ die('Could not connect: ' . mysql_error());
+}
+
+else {
+ $sql="UPDATE DeviceAddressTable SET portName = '$_REQUEST[portname]', number = '$_REQUEST[number]' WHERE deviceName = '$_REQUEST[device]'";
+
+ if($result = mysql_query($sql ,$db))
+ {
+ $message = '<font size="3" face="Century Gothic" color="LightGray"> UPDATE Device Succeed</font>';
+ }
+ else
+ {
+ $message = 'ERROR: '.mysql_error();
+ }
+ header('Location: http://132.230.4.202/tricode/devconfigManual.php');
+ }
+
+mysql_close($con)
+
+?>