//initilize PHP
// Connect to database
$connect = mysql_pconnect(localhost, hoodad, mysql);
//select which database you want to edit
mysql_select_db("sdrivers");
//convert all the posts to variables:
$SiteLabel = $_POST['SiteLabel'];
$SiteDate = $_POST['SiteDate'];
$Watershed = $_POST['Watershed'];
$SubBasin = $_POST['SubBasin'];
$Country = $_POST['Country'];
$DigitHydrologicUnitCode_6 = $_POST['DigitHydrologicUnitCode_6'];
$DigitHydrologicUnitCode_8 = $_POST['DigitHydrologicUnitCode_8'];
$DigitHydrologicUnitCode_11 = $_POST['DigitHydrologicUnitCode_11'];
$GAPSegmentType = $_POST['GAPSegmentType'];
$GAPSegmentLength = $_POST['GAPSegmentLength'];
$StreamOrder = $_POST['StreamOrder'];
$StreamName = $_POST['StreamName'];
$UTMzone = $_POST['UTMzone'];
$UTMeast = $_POST['UTMeast'];
$TMnorth = $_POST['TMnorth'];
$LegalDescription = $_POST['LegalDescription'];
$OmernikEcoregion = $_POST['OmernikEcoregion'];
$BaileyEcoregion = $_POST['BaileyEcoregion'];
$NearestTown = $_POST['NearestTown'];
$riverMile = $_POST['RiverMile'];
$DrivingDirections = $_POST['DrivingDirections'];
echo "----------------------------------------------------------
";
echo "UPDATED CONTENTS of the TABLE LOCATION are :
";
//select the table
$result = mysql_query("select * from sitelocation");
echo str_replace(" ", " ","SiteLabel SiteDate Watershed SubBasin Country DigitHydrologicUnitCode_6 DigitHydrologicUnitCode_8,DigitHydrologicUnitCode_11 GAPSegmentType GAPSegmentLength StreamOrder StreamName UTMzone UTMeast TMnorth,LegalDescription OmernikEcoregion BaileyEcoregion NearestTown RiverMile DrivingDirections
");
//grab all the content
while($r=mysql_fetch_array($result))
{
$SiteLabel =$r["SiteLabel"];
$SiteDate =$r["SiteDate"];
$Watershed =$r["Watershed"];
$SubBasin =$r["SubBasin"];
$Country =$r["Country"];
$DigitHydrologicUnitCode_6 =$r["DigitHydrologicUnitCode_6"];
$DigitHydrologicUnitCode_8 =$r["DigitHydrologicUnitCode_8"];
$DigitHydrologicUnitCode_11 =$r["DigitHydrologicUnitCode_11"];
$GAPSegmentType =$r["GAPSegmentType"];
$GAPSegmentLength =$r["GAPSegmentLength"];
$StreamOrder =$r["StreamOrder"];
$StreamName =$r["StreamName"];
$UTMzone =$r["UTMzone"];
$UTMeast =$r["UTMeast"];
$TMnorth =$r["TMnorth"];
$LegalDescription =$r["LegalDescription"];
$OmernikEcoregion =$r["OmernikEcoregion"];
$BaileyEcoregion =$r["BaileyEcoregion"];
$NearestTown =$r["NearestTown"];
$RiverMile =$r["RiverMile"];
$DrivingDirections =$r["DrivingDirections"];
//echo str_replace(" ", " ", "good golly miss *******************************************************&&&&&&&&&&&&&&&&&&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ molly!");
echo str_replace(" ", " ","$SiteLabel $SiteDate $Watershed $SubBasin $Country $DigitHydrologicUnitCode_6");
echo str_replace(" ", " ","$DigitHydrologicUnitCode_8 $DigitHydrologicUnitCode_11 $GAPSegmentType ");
echo str_replace(" ", " ","$GAPSegmentLength $StreamOrder $StreamName $UTMzone $UTMeast ");
echo str_replace(" ", " ","$TMnorth $LegalDescription $OmernikEcoregion $BaileyEcoregion $NearestTown ");
echo str_replace(" ", " ","$RiverMile ");
echo str_replace(" ", " ","$DrivingDirections
");
}
?>