just normal session start method,
abd letter use that instead of $_SESSION ok?

hope it help ;)

?! I didnt flag your post as bad! I'm sorry but I really didnt! I pressed Post Reply then my browser said I wasn't connected to the internet =.=, I really didnt flag your post but if I did for whatever reason I didnt mean it!

I just did a simple

<?php
session_start();
$_SESSION['greeting'] = "Hello world";
echo $_SESSION['greeting'];
echo '<a href="PHP2.php">Next</a>';
<?

and in PHP2

<?php
session_start();
echo $_SESSION['greeting'];
<?

and that didnt even work...

Of course this isn't going to work...your php ending tags are wrong... ?> NOT <?
If you have error_reporting enabled and ran that code exactly as you posted it, you should be getting a parse error.

<?php
//code
?>
<?php
session_start();
$_SESSION['greeting'] = "Hello world";
echo $_SESSION['greeting'];
echo '<a href="PHP2.php">Next</a>';
?>
<?php
session_start();
echo $_SESSION['greeting'];
?>

-richieking
$HTTP_SESSION_VAR was deprecated in php 4.1.0 by $_SESSION.

I don't actually get any errors at all, I just don't see the string that's echoed.
$HTTP_SESSION_VAR doesn't work.
I have error reporting enabled and still, no errors.

Are you sure???

post your php ini file please?

$HTTP_SESSION_VAR was deprecated in php 4.1.0 by $_SESSION.

mschroeder,

Are you sure about what TheSecOrg needs?
He need session to work on php2. That means http_session_var is what he needs.

He is on php2. my friend ;)

I see no reference to him using PHP2 in this thread anywhere...I see lots of references to his files being called PHP1 PHP2 etc though. Please enlighten me to where I'm missing this piece information.

I don't actually get any errors at all, I just don't see the string that's echoed.
$HTTP_SESSION_VAR doesn't work.
I have error reporting enabled and still, no errors.

Did you bother to read post by mschroeder?
He identifies your problem and gives solution. Enable error messages and you will see

I have enabled error messages, if I miss a ; at the end of an echo I get an error message saying expected ;.

Probably he needs to use SESSION. This will let you use the value over many pages. Judoka seems to solve this.

My Last resort on this case would be:
1. Try in another machine that works
2. Clean computer (with CCleaner/Advanced System care et al) and reinstall every PHP thing!
Something is wrong somewhere :)

Well im using a web host compatible with PHP! I've also used XAMPP before the web host.
I really don't think it's my machine.

try it instead of "not thinking so". PHP Code is ok!

OK.
...
Nope, not my machine. Tried 3 machines 2 of mine and 1 of my friends.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.