summaryrefslogtreecommitdiffstats
path: root/For Weekly Test/tricode/main.php
blob: 91f59380a360c4eb398ef1751a2c48e5f931c46f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?
$db = mysql_connect("localhost","root","randompasswordSQL");
mysql_select_db("gsmselftesting",$db);

$link = $db ;
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
if (isset($_REQUEST['Submit'])) 
	{
		$sql="UPDATE DeviceAddressTable SET portName = '$_POST[portname]', number = '$_POST[number]' WHERE deviceName = '$_POST[device]'";
		if($result = mysql_query($sql ,$db)) 
			{  
				$message = '<font size="3" face="Century Gothic" color="LightGray"> UPDATE Device Succeed</font>';
			}
		else
			{ 
				echo "ERROR: ".mysql_error(); 
			} 
	}
	
?>
		<table style="width:50%; margin:auto" border="0">
			<tr>
				<td height="100px" width ="120px" align="left">
				<font size="3" face="Century Gothic" color="LightGray">
			<form action="" method="POST">
						<input type="radio" name="device" value="GSMRZ1" /> RZ GSM 1<br>
						<input type="radio" name="device" value="GSMext.Eplus" /> E-Plus<br>
						<input type="radio" name="device" value="GSMext.O2" /> O2<br>
						<input type="radio" name="device" value="GSMext.Voda" /> Vodaphone<br>
						<input type="radio" name="device" value="GSMext.Tm" /> T-Mobile<br>
					
				</font>
				</td>
				<td height="100px" width ="100px" align="left">
				<font size="3" face="Century Gothic" color="LightGray">
					Port Number<br>
					IMEI<br>
					Number<br>
				</font>
				</td>
				<td height="100px" width ="90px" align="left">
				<font size="3" face="Century Gothic" color="LightGray">
					: <input type="text" name="portname" /></br>  
					: <input type="text" name="imei" /><br>
					: <input type="text" name="number" /><br>
				</font>
				</td>
				<td height="100px" width ="50px" align="left">
				<font size="3" face="Century Gothic" color="LightGray">
					<INPUT type="image" value="submit" name="submit" src="Images/SubmitButton.png"><br />
				</font>
				</td>
			
					</form>
			</tr>
		</table>