Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php session_start();
- include("include/conn_db.php");
- if( isset( $_POST['approved'] ) ) { // when the button is click to appove
- if ( $_POST['approve'] ) { // if the field is checked
- $sql = "update hi_renewal_license SET status='Renewed' where status='pending'";
- $result = mysql_query($sql,$connection) or die( "connect error ".mysql_error() );
- }
- else if (!$result) {
- header("Location:../login.php");
- //echo "Sorry, there has been a technical hitch. Entering details failed.<BR>";//exit;
- } else {
- $logged_in = $userid;
- $_SESSION['logged_in'] = $logged_in;
- unset($_SESSION['error_message']);
- header("Location:../administrator.php");
- } // nested if clause
- }// head if statement
- ?>
- this is the part which loops from the while loop:
- echo "<input name='approve' type='checkbox' />";
- echo "</td></tr>";
- }
- This are the two buttons which checks and uncheck the field
- <input type='button' onClick=\"SetAllCheckBoxes('check', 'approve', true);\" value=All><input type='button' onClick=\"SetAllCheckBoxes('check', 'approve', false);\" value=None>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement