ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old April 19th, 2003, 07:07 AM
duggster03 duggster03 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 2 duggster03 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Please help.. am lost in code (!)

Hi all

This is my first post here, and hope you can help me. I will try and explain what I need to do, and apologise in advance if this goes on a bit


Step 1: Pass Parameters from the database (via URL) to specific page on an external site. (with the agreement of the external site owners)

If all parameters have a value, then the user is automatically logged in to the external site and all is fine. This works perfectly already


Step 2: If one specific parameter in Step 1 is empty (which it will be the first time each user clicks the link), then the page the parameters are sent to generates a value and sends it back to me.

I need to write the new value directly into a database table and send a confirmation string straight back once it is written in. (this is a simple y/n parameter)

Once this is done, the user is automatically logged in (as per step 1)

The following times the user clicks the link, all parameters are complete and so they log in automatically.

I am struggling with how to write the received variable into the database and send the confirmation.

All of this has to be done without it being visible to the end user (ie: the scripting happens automatically when the link is clicked)

Can anyone point me in the right direction on this, as I am seemingly going round in circles.

Many many thanks in advance

duggster

Reply With Quote
  #2  
Old April 19th, 2003, 05:09 PM
defjamninja defjamninja is offline
Overly white
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: Fresno, CA
Posts: 83 defjamninja User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Question

Hmmm ok I think I'm following you. Here is what you should do. On page 2 if the variable, I'll just call it X, is empty then redirect back to a page on your site which will place the values in the database, then redirect back to the first site. Ok so here is some code to do it.
Code:
'step 2 page
If Len(Request.Querystring("X")) = 0 Then
    Response.Redirect("http://www.yoursite.com/xismising.asp?whateveryouneedtosendback=value"
End if

Code:
'step 2 your site write to db
Dim X
Dim intUser
Dim SQL
Dim Conn
Set Conn = Sever.Createobject("ADODB.Connection")
X=Request.Querystring("X")
intUser=Request.Querystring("UserID")
'do some checks to make sure this is
'a value that you are expecting, such 
'as Cint if it is supposed to be a 
'number.  Or check for SQL syntax if it 
'is supposed to be a string

'Setup your connection here
SQL = "UPDATE table SET field = " & X & " WHERE user = " & strUser & ";"
Conn.Execute(SQL)

Response.Redirect("http://www.theothersite.com/login.asp?whateveryouneedtosend=value")


I didn't test this code at all and I may have made some silly mistakes so take it all with a pound of salt . Hopefully it points you in the right direction.

Last edited by defjamninja : April 19th, 2003 at 05:11 PM.

Reply With Quote
  #3  
Old April 20th, 2003, 06:32 AM
duggster03 duggster03 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 2 duggster03 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thanks

Thanks so much

this is pretty much exactly what i needed

having stared at the concept for so long, my brain had become fried and i had totally forgotten about using a simple redirect (!)

You have helped me sooooo much thank you thank you thank you!

Now all i need is for the external site owner to run a test and hope it comes together

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Please help.. am lost in code (!)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway