directions location from form input
As mentioned we do not have php experience so I was hoping for something a bit beyond the theory, I have managed to cobble together this basic script (below) which allows input of the postcode and then places the postcode onto the page which although crude does work.
What I need to know is what is the correct syntax to input this variable into the maps postcode field on the directions page ( I am aware that I need to use the value ".$Pcode." but do not know what the syntax should be to get it into google maps.
I am hoping that it is all as simple as I have imagined.
Any help would be appreciated.
Thansk in advance
<?php
$Pcode = $_POST["Pcode"];
if (!isset($_POST['submit'])) { // if page is not submitted to itself echo the form
?>
<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<title>map test</title>
</head>
<body>
<form method="post" action="<?php echo $PHP_SELF;?>">
Post Code:<input type="text" size="12" maxlength="12" name="Pcode"><br />
<input type="submit" value="submit" name="submit">
</form>
<p>
<?
} else {
echo "Your postcode is ".$Pcode." .<br />";
{
echo $f."<br />";
}
echo "<i>".$quote."</i><br />";
}
?>