Javascript confirm delete inside PHP help

hi guys im trying to create a javascript prompt that will ask the user to confirm or cancel the delete command
below is my code

i cant seem to get it to work
[php]<?php
ob_start();
include(‘connectdb.php’);
?>

    <title>Student List</title>
<?php /* VIEW.PHP Displays all data from 'students' table */ // get results from database $result = mysql_query("SELECT * FROM students ORDER BY lname ASC") or die(mysql_error()); // display data in table echo "STUDENT LIST

"; echo ""; echo ""; // loop through results of database query, displaying them in the table while($row = mysql_fetch_array( $result )) { // echo out the contents of each row into a table echo ""; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ""; } // close table> echo "
Student Number Student Name Level Eligible for next School Year Enrollment Status
' . $row['stud_no'] . '' . $row['lname'] . ", " . $row['fname'] . " " . $row['mname'] . '' . $row['level'] . '' . $row['eligible'] . '' . $row['estatus'] . 'EditDelete
"; ?>

Add a new record


Return Administrator Main Page
Return to Admin Main Page
[/php]

the red text is the one im having problems on
what happens is the data automatically deletes the file from the database without the javascript prompt showing

help guise im lost
thx for replies

Sponsor our Newsletter | Privacy Policy | Terms of Service