summaryrefslogtreecommitdiffstats
path: root/For Weekly Test/tricode/insertdevice.php
blob: b3f73504735178b59a73c60e8bfdb743aae98bde (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
$con = mysql_connect("localhost","root","randompasswordSQL");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("gsmselftesting", $con);
$sql="UPDATE DeviceAddressTable SET portName = '$_POST[portname]', number = '$_POST[number]' WHERE deviceName = '$_POST[device]'";


if (!mysql_query($sql,$con))
  {
  die('Error: ' . mysql_error());
  }
else
{
echo "1 record added";
}
mysql_close($con)
?>