Initial import

This commit is contained in:
Thomas Misund committed 2009-10-13 15:43:04 +02:00
commit 057959cb8f
1198 files changed
+89467

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
<?php
require_once "functions.php";
require_once "includes.php";
header("Content-type: application/xml");
print('<?xml version="1.0" encoding="ISO-8859-1"?'.'>');
$conn = db_connect();
$zip = $_REQUEST['zip'];
$sql = "SELECT poststed AS postarea
FROM din_postnummer
WHERE postnummer = $zip";
$result = $conn->query($sql);
if ($row =& $result->fetchRow(DB_FETCHMODE_OBJECT)){
?><postinfo>
<postarea><?php print $row->postarea; ?></postarea>
</postinfo>
<?php
}else {
?><postinfo>
<postarea>ugyldig postnummer</postarea>
</postinfo>
<?php
}
?>