Hi,
I had a form handling script that was running on my website which was working fine while I was running PHP v5.2.4. I had to upgrade to 5.2.14 in order to resolve a dependency for wikimedia, and now my script is having issues. The odd thing is that it partly works, and I cannot figure out for the life of me what's going on. Here's the general deal :
I send to the script via my browser the following parameters:
app-test.php?latitude=32.1754&longitude=-111.09375
The info gets grabbed like this:
$latitude = $_GET['latitude'];
$longitude = $_GET['longitude'];
I then return a form that is populated with the values, just in case the user wants to tweak them, and to have them add a bit more information. Here is the form code :
<tr>
<td><input type="text" name="latitude" size="40" value="<?php $latitude ?>"></td>
</tr>
<tr>
<td><strong> Longitude </strong></td>
</tr>
<tr>
<td><input type="text" name="longitude" size="40" value="<?php $longitude ?>"></td>
</tr>
All I am getting in the returned form is the actual text you see in the value= section. It was working before the upgrade, and stopped after. Nothing else changed.
The other odd part is that I present a static map image using the lat/long coords passed to the script using this line:
<?php
printf ("<img src=\"http://maps.googleapis.com/maps/api/staticmap?center=%s,%s&markers=color:blue|%s,%s&zoom=15&size=300x150&sensor=false\">", $latitude, $longitude, $latitude, $longitude);
?>
That still works perfectly. So, I know the lat/long sent to the script are being used to set the variables. I just cannot figure out why it won't populate the form field with the info, and is putting the php code in instead!
I'm sure I could make this work with the printf statement like I do for my map, but I'm more interested in understanding why this isn't working. Does anybody have any thoughts?
Thanks!
Mark