Get support from Xavier Media
It is currently Sun Dec 08, 2013 12:24 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: inactivation code
PostPosted: Thu May 06, 2010 12:54 pm 
Offline
Rookie
Rookie

Joined: Sun Apr 18, 2010 5:57 pm
Posts: 11
Points: 0
hi, hope all be fine

i need to ask about how to make a user inactive instead of deleting it from the database
i.e: i need it to be hidden for the viewer when he use my web application but in fact it exists in my database.
using php code

how could i do this?

thanks in advance


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: inactivation code
PostPosted: Thu May 06, 2010 4:34 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
I don't think you can.

Why not just create a copy of the structure and then add back the users.

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: inactivation code
PostPosted: Sun May 16, 2010 3:09 pm 
Offline
Rookie
Rookie

Joined: Sun Apr 18, 2010 5:57 pm
Posts: 11
Points: 0
Quote:
Why not just create a copy of the structure and then add back the users.


i don't understand

if i can't do that

so if i can make the data hidden for the viewer of the web application and not deleted from the database ?


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: inactivation code
PostPosted: Sun May 16, 2010 3:13 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
I don't think I understand the issue here. Could you please explain more in detail what you want to do.

Are you using Cookie Password Protection or is this a general database problem?

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: inactivation code
PostPosted: Sun May 16, 2010 4:32 pm 
Offline
Rookie
Rookie

Joined: Sun Apr 18, 2010 5:57 pm
Posts: 11
Points: 0
here is the issue

i need to make the viewer to my web application when he press on a button to make some users in my database in active or hidden to him but without deleting them from my database

i added an attribute to a table in my database which has the status of the user

0>>> inactive

1>>> active

but there is something wrong it doesn''t change the status in the database

here is the code

Code:
mysql_connect("localhost","root","");
mysql_select_db("dbname");
if($_REQUEST['select'] == "Activate")

{
mysql_query("update table1 set status=1 where P_id in $Patient_id");

}
if($_REQUEST['select'] == "Deactivate")

{
mysql_query("update table1 set status=0 where P_id in $Patient_id");

}

$query = "SELECT * FROM `table1`";

$dd=mysql_query($query);
?>


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: inactivation code
PostPosted: Sun May 16, 2010 4:36 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
Is $Patient_id submitted via a form or something because if it is you may have to change it to $_REQUEST[Patient_id] to have it working.

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Registered users: No registered users


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Portal » Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
[
SEO MOD © 2007 StarTrekGuide ]