1
djayc2104
I really have a problem!
  • 2006/11/6 16:13

  • djayc2104

  • Just popping in

  • Posts: 40

  • Since: 2006/9/26


Hi everyone,
Just to say first that XOOPS is great and the best CMS out there. Well thats all the praise over and done with, I have a prob that I hope can be sorted before I pull all my hair out.
I am using XOOPS 2.0.15 and whatever I do I cannot pass url variables, what I mean is
www.mydomain.co.uk/index.php?yourid=123456.
I am trying to store the variable and use it on another page of my site.
I have tried the following methods:

1.Setting a session and calling it with $_SESSION['yourid'].

2.Coded the session as a class function and included it once under the include"header.php"

3.I have tried setting it in a cookie with setCookie($name, $value, $time) and calling it with $yourid = $_COOKIE[$name]

4.I have tried witing it to a small file on my server.
I have included the globals $_COOKIE etc, even though it says you dont need to.

Nothing I try is working. Am I doing something wrong with my coding?????
I have changed preferences to allow me to use my own cookies.
I have tried to search the forum for answers, please help me so I can finish my module.
Thanks
Dave

2
tripmon
Re: I really have a problem!
  • 2006/11/6 17:03

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


Can you post some examples of the actual code you are trying to use as well as environment vars (server type, php ver, XOOPS ver, etc.) info

3
djayc2104
Re: I really have a problem!
  • 2006/11/6 18:29

  • djayc2104

  • Just popping in

  • Posts: 40

  • Since: 2006/9/26


hi,
Thanks for your response.
My vars are:
Apache vers: 1.3.34
PHP version 4.4.1
Xoops version 2.0.15
Code Im using is as follows:

1)Sessions
function setsessionvalue($name, $value){
session_start();
$_SESSION[$name] = $value;
}
function getsessionvalue($name){
session_start();
if (isset($_SESSION[$name])){
return $_SESSION[$name];
} else {
return false;
}
}
2)Cookies
function setcookievalue($name, $value, $time){
setCookie($name, $value, $time()+3600*24);
}
to get the cookie value I use
$value = $_COOKIE($name);

Hope this helps in helping me where I'm going wrong

Thanks
Dave

Login

Who's Online

163 user(s) are online (107 user(s) are browsing Support Forums)


Members: 0


Guests: 163


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits