Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:42 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.