SunQuest
           Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl 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
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old June 1st, 2000, 05:14 PM
smmorrow smmorrow is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: Pennsylvania, USA
Posts: 37 smmorrow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 15 sec
Reputation Power: 9
In a previous SSI perl script that I wrote, the last statements were:

print "content-type: text/htmlnn";
exit 0;

Instead of writing these statements, is it possible to do:
print header (-cookie=>$ID); ?

I was originally auto-submitting a form within the cgi script (using imbedded javascript) that would call a php3 script that created the cookie, checked for the cookie, then redirected to a URL. While that worked fine, now they are telling me that they want this new URL to be displayed in a new opened window with certain features like toolbars=no, height=xx, width=xxx, etc. I can't do that in the php page with a redirect.

So, now I'm thinking I could execute the cgi-script (which updates the database) via an SSI call. When it returns to the html from where it's called, the client can open up a new window with the appropriate URL. BUT, I need a cookie set before that happens, or other things on the site won't work properly. I can't send the ID via query-strings because it passes through html pages prior to being needed.

Any thoughts? Sorry if I didn't explain this very well.

Sharon

Reply With Quote
  #2  
Old June 2nd, 2000, 05:32 AM
Shiju Rajan's Avatar
Shiju Rajan Shiju Rajan is offline
.Net Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: London
Posts: 987 Shiju Rajan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 26 m 22 sec
Reputation Power: 9
Send a message via MSN to Shiju Rajan Send a message via Yahoo to Shiju Rajan
pls explain it very clearly.....

------------------
SR -
shiju.dreamcenter.net

"The fear of the LORD is the beginning of knowledge..."

Reply With Quote
  #3  
Old June 2nd, 2000, 07:28 AM
smmorrow smmorrow is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2000
Location: Pennsylvania, USA
Posts: 37 smmorrow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 15 sec
Reputation Power: 9
I'll try - it's not easy to explain. This will be long.....

Here's my current process:
A user on an internal system indicates that they want to view the tutorial, which is on a server. The internal system is setup to pass a userid and password to a 'tracking system' - my scripts. My job in the tracking system is to set them up on the database, set a cookie (so we know later that they're visiting the tutorial as they pass through multiple static pages), and then transfer them to the tutorial at a specific URL. This is working fine, but they want the tutorial, when they get there, to appear in a new window, opened to a specific size and without toolbars.

My cgi-script (the first thing receiving control from this internal system) updates the database and then creates a hidden form, which is autosubmitted to a PHP script. This PHP script then sets a cookie, calls itself back to make sure it's set, and if it is - it redirects to the tutorial. It is only being done this way so I can check to make sure they have cookies enabled before proceeding.

When the php script redirects after it's finished with the cookie check - it can't open up the tutorial in a new window (that can't be done with a redirect).

SO - I'm considering changing the process so that my cgi-script will be executed as an SSI call from the internal system and IT will set the cookie rather than submitting the form to the php script.

I know that the last statement of an SSI has to be the
print "content-type: text/htmlnn";
exit 0;
in order to return to the .shtml that has called it. What I'm asking is: instead of printing the content-type statement, can I create a cookie as the last thing that happens before returning to the .shtml? There won't be a check in place to make sure cookies are enabled, but this is the best option I can come up with.

It's difficult to test these scenarios because the internal system is live - so I'm trying to determine the viability of this solution before I ask them to make changes to that internal system.

Sharon

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > SSI and cookie creation


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


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





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