<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="PSPad editor, wwwpspad.com">
<title>Ilmade sisestamine</title>
</head>
<body>
<h1>Ilmade sisestamine </h1>
<?php
require("ilmkonf.php");
if(isSet($_GET['linn']) && isSet($_GET['temp']) ){
$linn=$_GET['linn'];
$temp=$_GET['temp'];
mysql_connect($masin, $kasutajanimi, $parool);
mysql_select_db($baasinimi);
$korras=mysql_query("INSERT INTO ilm (linn, temp) values('$linn', '$temp') ");
if($korras){
echo "<script type='text/javascript'>
alert('Sisestamine õnnestus')
</script>";
} else {
echo "Sisestamine ebaõnnestus: " . mysql_error();
}
mysql_close();
}
?>
<form>
<fieldset>
<legend>Ilm pealinn</legend>
Sisesta linn:
<input type="text" name="linn">
<br>
Temperatuur
<input type="text" name="temp">
<input type="submit" value="OK">
</fieldset>
</form>
</body>
</html>