//construct a global variable for the form profile
$fields = array("fdate", "actype", "acid", "nlandings", "nhours");

problem down in while loop
.. . . . . .
function displayDeleteForm(){
    //get $fields into the function namespace
    global $fields;                          
        global $conn;                        
/* Create and execute query. */              
//     $query = "select * from log_book_id"; 
//     $result = mysql_query($query);        
// Loop through each row, outputting the actype and name
     echo <<<HTML                                       
    Pilots Logbook entries stored in mySQL Relational Database
under Redhat Fedora 8 Linux                                   
    <form action="{$_SERVER['PHP_SELF']}" method="post">      
    <table width="50%" align="center" border="1">             

    //get log_book_id table information
    $user = "select * from log_book_id";
    $result = oci_parse($conn, $user);  
        $r = oci_execute($result);      

    //display log_book_id information
    $count = 0;                      

    while ($newArray = oci_fetch_assoc($result)) {
        foreach ($fields as $field){              
            ${$field} = $newArray[$field];        // values not making it into 
        $rowID = $newArray['rowID'];              

        //note that we do not rely on the checkbox value as not all browsers 
submit it
        //instead we rely on the name of the checkbox.                          
        echo <<<HTML                                                            
            <input type="checkbox" name="checkbox[$rowID]" value="$rowID">Check 
to delete record


    }    // while
    echo <<<HTML 
        <td colspan="7">
            <input type="submit" name="delete" value="delete checked 
            <input type="submit" name="new" value="New Log Entry" />&nbsp;      
            <input type="reset" name="reset" value="Reset Form" />              
}    //close function                                                           


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to