summaryrefslogtreecommitdiffstats
path: root/Website/insertdevice.php
diff options
context:
space:
mode:
Diffstat (limited to 'Website/insertdevice.php')
-rw-r--r--Website/insertdevice.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/Website/insertdevice.php b/Website/insertdevice.php
new file mode 100644
index 0000000..1b83f65
--- /dev/null
+++ b/Website/insertdevice.php
@@ -0,0 +1,26 @@
+<?php
+$db = mysql_connect("localhost","root","randompasswordSQL");
+mysql_select_db("gsmselftesting",$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)
+
+?>