\n" ; break ; } //The above only got the $query string ready --- the following makes the query and checks for errors. $result = mysql_query( $query, $link ) ; if ( $result ) { if ( $action == "add" ) { echo "success
\n" ; } } else { echo mysql_error($link) . "
\n" ; } //Make the result pretty and print it out, if we are looking at the results. if ( $action == "see" ) { $num_rows = mysql_num_rows( $result ) ; echo "\n" ; while ( $a_row = mysql_fetch_row( $result ) ) { echo "\n" ; foreach ( $a_row as $field ) { echo " \n" ; } echo "\n" ; } echo "
$field
\n" ; } //Close the link mysql_close( $link ) ; ?> Back