Need help manager page

Reply

Join Date: Apr 2009
Posts: 44
Reputation: JooClops is an unknown quantity at this point 
Solved Threads: 0
JooClops JooClops is offline Offline
Light Poster

Need help manager page

 
0
  #1
Jun 19th, 2009
Hi everyone,
I'm cureently working on a project for computer calss,we are building a website... it's on locachost.
so I came across something I couldn't figure how to create.
Basically I need to create an admin page , which Enables me to see all the users and delete\update their information.
I'm on the half way and i''m pretty stuck.
What I've done :
Made the session thing so that it ensures I'm an admin.
I was able to show in a table all the users from my database.
What I need to do:
Make a Radio button near every user, the one that is checked,is the one that the button "delete" will affect on, and it will IT from the database.
also the user that is checked by the radio button, will be also affected by the Update button , which will open a windows same as the registration window but with all values enterred, and just some things to change.
(I want to make the users' data Changeable "LIVE" in the table of the users' data , but it's hard, so I'll pass on it)

So any body with Ideas?
I don't know how can I make using the radio button, to point out exactly which user to delete.
Any help is appreciated
thank You,
Jc
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 18
Reputation: jsvanc is an unknown quantity at this point 
Solved Threads: 1
jsvanc jsvanc is offline Offline
Newbie Poster

Re: Need help manager page

 
0
  #2
Jun 28th, 2009
JooClops,

When you create the radio button, assign it a value of the database id for that user. I am assuming that you have an autonumber value in the database for each user when they get created. If this is the case, then when you lookup the value for the user, use the autonumber field as the value for the radio button.

  1. <% Do While Not rs.EOF %>
  2. <input type="radio" name="userid" value="<%=rs("userid")%>">
  3. <%
  4. rs.movenext
  5. Loop
  6. %>

This way, when you click the delete button, this submits the value of the radio button userid. When you delete the database record, you use this value and your source of deletion.

Hope this helps.
Hit any user to continue......
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 44
Reputation: JooClops is an unknown quantity at this point 
Solved Threads: 0
JooClops JooClops is offline Offline
Light Poster

Re: Need help manager page

 
0
  #3
Jun 28th, 2009
oh cool ,
didn't think about that , well my users are not auto numbered so i need to add it myself , anyway i need to give out my project in a few hours, so i cant really change anything :<
but thanks
JC
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 18
Reputation: jsvanc is an unknown quantity at this point 
Solved Threads: 1
jsvanc jsvanc is offline Offline
Newbie Poster

Re: Need help manager page

 
0
  #4
Jun 28th, 2009
It don't have to be an autonumber field, that's just usually how they are numbered. However you are doing the lookup, I would use the identity field that you set for each user to lookup the value and set that value in the radio button. This will work exactly the same for the update button too.

If this helped you out, please mark this thread as solved.

Thanks,

JSV
Hit any user to continue......
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC