Wrox Programmer Forums
|
BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143
This is the forum to discuss the Wrox book Beginning PHP 6, Apache, MySQL 6 Web Development by Timothy Boronczyk, Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz; ISBN: 9780470391143
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 3rd, 2010, 09:57 AM
Registered User
 
Join Date: May 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Delete User Ch. 13

Hi All,
I want to add a Delete User button to Modify Account in cms_user_account in Chapter 13.
I inserted the following case in cms_transact_user but it didn't work. I really need this to work as I am using this as part of my assignment due tomorrow.
Please someone reply, I would be very grateful indeed.

PHP Code:
    case 'Delete User':
        
session_start();
        if (isset(
$_POST['delete user']) && $user_id='') {
        
$sql 'DELETE FROM site_users WHERE user_id = ' $user_id;
        
mysql_query($sql$db)
        or die(
'Could not update user account; ' mysql_error());
        }
        
redirect('cms_admin.php');
        break; 
The button for delete in cms_user_account.
PHP Code:
<?php
if ($_SESSION['access_level'] > 2) {
    echo 
'<tr>';
    echo 
'<td> </td>';
    echo 
'<td> <input type="submit" name="action" value="Delete User"/> ';
    echo 
'</td>';
}
?>
Thanks in advance for any help with this.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 13-cms_articles_compose nuhbutt BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 1 June 1st, 2010 12:28 PM
Simple Pagination for Ch 13 djlfreak BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 0 June 1st, 2010 08:29 AM
CH 13 some errors solved sporik BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 0 December 4th, 2009 01:31 PM
Search ch 13, ch 16 sporik BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 0 October 27th, 2009 04:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.