I have this script I got from:
http://www.falconsolution.com/distance-calculator/
what I have is the "sample.php", and the "DrivingDistanceCalcFunctions.php" which is encrypted. The source for "sample.php" can be viewed here: http://www.flybydesign.net/PHP/sample.txt
I am learning PHP as I go, so I'm just looking to be pointed in the right direction. I need to add an extra stop into this sample. Here is the code I've been trying to use, but I get an error,
<?
do {
$fromZipCode = $fromZipCodeNew;
$fromZipCode2 = $fromZipCode;
$fromZipCode2 = 0;
// Code below, is what I'm told to add on their webpage
// I'm trying to run DrivingDistanceCalcFunctions.php again after I have
// changed the variables and saved them to other variables
**include( "DrivingDistanceCalcFunctions.php" );
**getDistance( $fromZipCode, $toZipCode );
**echo "Distance between ".$FromCity."(".$FromState.") and
**********".$ToCity."(".$ToState.") is <b>".$DrivingDistance."</b> miles";
} while($fromZipCode2 > 0);
?>
I'm not sure if a do/while is the best way to do this, but I also tried an if/else that gives a different error, but the problem is, the line it tells me the error is on, is not the same line that the actual code it refers to is on, so thats probably what is throwing me off the most...
Can someone please help me?



Reply With Quote


Bookmarks