Current location: Hot Scripts Forums » Programming Languages » ASP » Best way to move database records to other ASP script?


Best way to move database records to other ASP script?

Reply
  #1 (permalink)  
Old 07-07-06, 05:54 PM
matrixman matrixman is offline
Newbie Coder
 
Join Date: Apr 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Best way to move database records to other ASP script?

Hello, I'm a teacher working on a web site for my students next year and I'm fairly stuck. I do know a little bit about programming, but I'm pretty much an ASP noob. Right now I have a log in program that I want to be able to take the students log in information (their username and password) and plug it into a message board so that they don't have to log in twice. Unfortunetly I'm having more difficulty doing this then I thought I would. I'm hoping someone will have some insight into my difficulty. It seems like it should be easy for someone who understands the syntax better than I, but perhaps I'm completely off there.

This is the info stored in the database (I guess the record information I need to transfer).

Code:
If NOT RS.EOF AND sessionLoggedIn Then
	If Decrypt(RS("pass")) = Decrypt(Request.Cookies("siteprotect")("password")) Then
		RS("ip")		= Request.ServerVariables("REMOTE_ADDR")
		usr_ID			= RS("ID")
		usr_username	= RS("username")
		usr_password	= RS("pass")
So I need to take usr_username and usr_password and plug it into this app:

Code:
     <tr bgcolor="<% = strTableColour %>" background="<% = strTableBgImage %>">
         <td colspan="2" bgcolor="<% = strTableColour %>" background="<% = strTableBgImage %>" class="text">*<% = strTxtRequiredFields %></td>
     </tr>
     <tr bgcolor="<% = strTableColour %>" background="<% = strTableBgImage %>" >
         <td width="50%"  bgcolor="<% = strTableColour %>" background="<% = strTableBgImage %>" class="text"><% = strTxtUsername %>*</td>
         <td width="50%" bgcolor="<% = strTableColour %>" background="<% = strTableBgImage %>" class="text"><input type="text" name="name" id="name" size="15" maxlength="15" value="<% = strUsername %>" /></td>
     </tr>
     <tr bgcolor="<% = strTableColour %>" background="<% = strTableBgImage %>">
         <td width="50%"  bgcolor="<% = strTableColour %>" background="<% = strTableBgImage %>" class="text"><% = strTxtPassword %>*</td>
         <td width="50%" valign="top" background="<% = strTableBgImage %>"><input type="password" name="password" id="password" size="15" maxlength="15" value="<% = strPassword %>" /><%
So that when my student clicks on the message board link, it will just log them in automatically and they don't have to login to the forum also.

Hope this makes sense. If it seems to difficult, I am willing to pay someone, but just keep in mind I'm a teacher so I'm broke.

Thanks for any help!
Reply With Quote
  #2 (permalink)  
Old 07-07-06, 06:56 PM
koncept
Guest
 
Posts: n/a
do you have access to both sites?? I have some ideas, but you cannot set the text to a password field.
Reply With Quote
  #3 (permalink)  
Old 07-07-06, 07:07 PM
matrixman matrixman is offline
Newbie Coder
 
Join Date: Apr 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by koncept
do you have access to both sites?? I have some ideas, but you cannot set the text to a password field.
Hi, thanks for the response.

Both of these scripts are being run from the same server (same web site). The primary issue is that I just need to know how to save the database record (from the script I use to login to the website) somehow (either to a cookie, or some kind of Query string) and then plug it in properly to the message board script.

For whatever reason, I can't seem to just query the database record from the message board script. At first I just thought it was a database mapping issue, but I don't think that's the case. Perhaps I'm wrong, but I'm really stuck on getting this seemingly 'simple' thing to work. I've literally spent several days on it, and finally thought I'd throw it out here to see if anyone has any ideas.

If what I'm doing isn't entirely clear, let me know and I'll try and make it more clear because I may not be using the proper 'language' to explain this issue.
Reply With Quote
  #4 (permalink)  
Old 07-07-06, 07:13 PM
koncept
Guest
 
Posts: n/a
ok since you have access to both sites and they are on the same site, i would find the cookie information in the message board and have the login script create a second cookie that allows access to the message board.

so i login in to script 1
- script 1 shows my personal page/menu/what ever
- script 1 creates login cookie for message board
then when i click on a link to the message board i will not need to log into the message board

i hope that makes sense...

if you want to go this route, find the user check script and copy the cookie information into your login script's user check
Reply With Quote
  #5 (permalink)  
Old 07-07-06, 07:57 PM
matrixman matrixman is offline
Newbie Coder
 
Join Date: Apr 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by koncept
ok since you have access to both sites and they are on the same site, i would find the cookie information in the message board and have the login script create a second cookie that allows access to the message board.

so i login in to script 1
- script 1 shows my personal page/menu/what ever
- script 1 creates login cookie for message board
then when i click on a link to the message board i will not need to log into the message board

i hope that makes sense...

if you want to go this route, find the user check script and copy the cookie information into your login script's user check
I think this makes sense, but I don't think I could do it.

I already have all this info in the login database and cookie. Why can't I just grab this data and plug it into the message board script? That's what I've been trying to do, but unsuccessfully.
Reply With Quote
  #6 (permalink)  
Old 07-07-06, 08:08 PM
koncept
Guest
 
Posts: n/a
i was assuming the message board set a session cookie, i was going ot have you create an additional cookied (matching name) for the message board when the login to script 1 occurs.
Reply With Quote
  #7 (permalink)  
Old 07-07-06, 08:15 PM
matrixman matrixman is offline
Newbie Coder
 
Join Date: Apr 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by koncept
i was assuming the message board set a session cookie, i was going ot have you create an additional cookied (matching name) for the message board when the login to script 1 occurs.
If you think something like that would work, and would want to do it, I'd rather just pay to have it done. Is that something you'd be interested in?
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create database for user management / webpage protection script Arise PHP 2 12-21-05 01:20 AM
asp script run autonomously on server shermski ASP 4 10-03-05 07:09 AM
I need a hosting script in ASP test ASP 3 09-29-04 08:58 AM
error when creating database tables with php script spiroth10 PHP 4 01-06-04 03:59 PM
Repeating MySQL records in a mail script watix PHP 2 07-22-03 05:25 PM


All times are GMT -5. The time now is 03:48 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.