summaryrefslogblamecommitdiffstats
path: root/Website/insertdevice.php
blob: 1b83f65d8671722a8d1e646c0274407fabd842a7 (plain) (tree)

























                                                                                                                                                   
<?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)

?>