This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-08-06 20:26:15

XenoK
Scratcher
Registered: 2011-09-08
Posts: 1000+

PHP question

How to transfer $_SESSION data from one place to another via storing it in a mysql database.


Eternity Tasks has launched into Alpha One! http://tasks.eternityincurakai.com/EI%20projects.png

Offline

 

#2 2012-08-06 20:29:37

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: PHP question

XenoK wrote:

How to transfer $_SESSION data from one place to another via storing it in a mysql database.

On the same website/domain?


http://i.imgur.com/BAEgGDL.png

Offline

 

#3 2012-08-06 20:32:44

XenoK
Scratcher
Registered: 2011-09-08
Posts: 1000+

Re: PHP question

GeonoTRON2000 wrote:

XenoK wrote:

How to transfer $_SESSION data from one place to another via storing it in a mysql database.

On the same website/domain?

sort of.  The way that godaddy makes sub-domains work are a bit confusing, but across sub-domains.


Eternity Tasks has launched into Alpha One! http://tasks.eternityincurakai.com/EI%20projects.png

Offline

 

#4 2012-08-06 20:41:22

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: PHP question

*.eternityinc-official.com would be the domain you use across sub-domains.

Offline

 

#5 2012-08-06 20:54:17

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: PHP question

As long as they're on the some server, you can use this:

Code:

session_id("YOUR SESSION ID HERE");
session_start();

http://i.imgur.com/BAEgGDL.png

Offline

 

#6 2012-08-06 20:54:44

XenoK
Scratcher
Registered: 2011-09-08
Posts: 1000+

Re: PHP question

Magnie wrote:

*.eternityinc-official.com would be the domain you use across sub-domains.

yes but how?


Eternity Tasks has launched into Alpha One! http://tasks.eternityincurakai.com/EI%20projects.png

Offline

 

#7 2012-08-06 20:58:56

XenoK
Scratcher
Registered: 2011-09-08
Posts: 1000+

Re: PHP question

GeonoTRON2000 wrote:

As long as they're on the some server, you can use this:

Code:

session_id("YOUR SESSION ID HERE");
session_start();

awesome! thanks!


Eternity Tasks has launched into Alpha One! http://tasks.eternityincurakai.com/EI%20projects.png

Offline

 

#8 2012-08-07 13:48:20

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: PHP question

XenoK wrote:

GeonoTRON2000 wrote:

As long as they're on the some server, you can use this:

Code:

session_id("YOUR SESSION ID HERE");
session_start();

awesome! thanks!

Actually, no. The session ID is stored in a cookie. It will definitely not go across different domains (even on the same server), but might go across subdomains.

Also, for using subdomains, you actually want ".yoursite.com" instead of "*.yoursite.com"


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#9 2012-08-07 14:25:53

XenoK
Scratcher
Registered: 2011-09-08
Posts: 1000+

Re: PHP question

jvvg wrote:

XenoK wrote:

GeonoTRON2000 wrote:

As long as they're on the some server, you can use this:

Code:

session_id("YOUR SESSION ID HERE");
session_start();

awesome! thanks!

Actually, no. The session ID is stored in a cookie. It will definitely not go across different domains (even on the same server), but might go across subdomains.

Also, for using subdomains, you actually want ".yoursite.com" instead of "*.yoursite.com"

It worked for me actually.


Eternity Tasks has launched into Alpha One! http://tasks.eternityincurakai.com/EI%20projects.png

Offline

 

#10 2012-08-07 17:16:16

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: PHP question

jvvg wrote:

XenoK wrote:

GeonoTRON2000 wrote:

As long as they're on the some server, you can use this:

Code:

session_id("YOUR SESSION ID HERE");
session_start();

awesome! thanks!

Actually, no. The session ID is stored in a cookie. It will definitely not go across different domains (even on the same server), but might go across subdomains.

Also, for using subdomains, you actually want ".yoursite.com" instead of "*.yoursite.com"

*facepalm*
No, sessions are stored on the server.


http://i.imgur.com/BAEgGDL.png

Offline

 

#11 2012-08-07 22:08:05

XenoK
Scratcher
Registered: 2011-09-08
Posts: 1000+

Re: PHP question

GeonoTRON2000 wrote:

jvvg wrote:

XenoK wrote:

awesome! thanks!

Actually, no. The session ID is stored in a cookie. It will definitely not go across different domains (even on the same server), but might go across subdomains.

Also, for using subdomains, you actually want ".yoursite.com" instead of "*.yoursite.com"

*facepalm*
No, sessions are stored on the server.

according to this: http://www.htmlgoodies.com/beyond/php/a … ssions.htm , the session id is stored in a cookie, but everything else is stored in the server.

Last edited by XenoK (2012-08-07 22:09:20)


Eternity Tasks has launched into Alpha One! http://tasks.eternityincurakai.com/EI%20projects.png

Offline

 

#12 2012-08-07 22:25:28

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: PHP question

XenoK wrote:

GeonoTRON2000 wrote:

jvvg wrote:


Actually, no. The session ID is stored in a cookie. It will definitely not go across different domains (even on the same server), but might go across subdomains.

Also, for using subdomains, you actually want ".yoursite.com" instead of "*.yoursite.com"

*facepalm*
No, sessions are stored on the server.

according to this: http://www.htmlgoodies.com/beyond/php/a … ssions.htm , the session id is stored in a cookie, but everything else is stored in the server.

*facepalm*
I mean the session data. (such as variables)


http://i.imgur.com/BAEgGDL.png

Offline

 

#13 2012-08-07 22:30:59

XenoK
Scratcher
Registered: 2011-09-08
Posts: 1000+

Re: PHP question

GeonoTRON2000 wrote:

XenoK wrote:

GeonoTRON2000 wrote:


*facepalm*
No, sessions are stored on the server.

according to this: http://www.htmlgoodies.com/beyond/php/a … ssions.htm , the session id is stored in a cookie, but everything else is stored in the server.

*facepalm*
I mean the session data. (such as variables)

:{ ok, my question has been answered and solved...


Eternity Tasks has launched into Alpha One! http://tasks.eternityincurakai.com/EI%20projects.png

Offline

 

Board footer