Logodiv> Unable to connect to the database server at this time.

'); } // Select the geneology database if (!@mysql_select_db('geneology')){ exit('

Unable to locate the geneology database at this time.

'); } // ---------------------------------------------- // // if data has been submitted, add it to the database // // ---------------------------------------------- if(!($_POST['marriageDate']==Null)){ //Need lots of Data Testing Right Here. $marriageDate='\'' . $_POST['marriageDate'] . '\''; $personKey1='\'' . $_POST['personKey1'] . '\''; $personKey2='\'' . $_POST['personKey2'] . '\''; $marriedDivorced='\'' . $_POST['marriedDivorced'] . '\''; if($_POST['place']==Null){$place = "NULL";}else{$place='\'' . $_POST['place'] . '\'';}; if($_POST['placeCity']==Null){$placeCity = "NULL";}else{$placeCity='\'' . $_POST['placeCity'] . '\'';}; if($_POST['placeState']=="NULL"){$placeState = "NULL";}else{$placeState='\'' . $_POST['placeState'] . '\'';}; $dataReadyToAdd = 'INSERT INTO marriages set marriageDate=' . $marriageDate . ', personKey1=' . $personKey1 . ', personKey2=' . $personKey2 . ', marriedDivorced=' . $marriedDivorced . ', place=' . $place . ', placeCity=' . $placeCity . ', placeState=' . $placeState . ';'; echo '

' . ' ' . $marriageDate . ' ' . $personKey1 . ' ' . $personKey2 . ' ' . $marriedDivorced . ' ' . $place . ' ' . $placeCity . ' ' . $placeState . '

'; if (@mysql_query($dataReadyToAdd)) { echo '

Marriage between person' . $_POST['personKey1'] . ' and ' . $_POST['personKey2'] . ' was added to the Database.

';}else{echo'

Error adding marriage between ' . $_POST['personKey1'] . ' and ' . $_POST['personKey2'] . ' to the database.

' . mysql_error() . '

';} // ---------------------------------------------- // // End add record to database // // ---------------------------------------------- }else{ // ---------------------------------------------- // // Display the default page, a form to enter data. // // ---------------------------------------------- ?>

Enter the following information for the Marriage.


Date of Marriage*: in the form 0000-00-00

Place of Marriage:

City of Marriage: State of Marriage:


Select first Spouse:'; echo '

'; //Reset mysql query $result mysql_data_seek($result, 0); echo '

Select Remaining Spouse:'; echo '

'; ?>

Is This a Marriage or Divorce:

* Denotes a Required Field

back