Page 1 of 1

hyperlink

Posted: Tue Aug 15, 2006 1:25 am
by shiranwas
Hi,

I have a html page with hyperlinks, i have use a session variable for user id, but this variable does not carry a value to the page it directs when i clik a hyperlink,
but it works in the page i have mentioned in the form tag

<form method="POST" action="complaintrdata.php">

this is my hyperlink

<a href="assign.php">assing</a>

can anyone tell me why is not this works.

thanks

Posted: Tue Aug 15, 2006 1:29 am
by s.dot
are you calling session_start() at the top of your new page?

Posted: Tue Aug 15, 2006 1:36 am
by shiranwas
no i call session_start() only in the page where i have the session variable

Posted: Tue Aug 15, 2006 1:58 am
by feyd
you must call it on any page where you wish to use session data.

Posted: Tue Aug 15, 2006 3:58 am
by dibyendrah
If you don't want to add session_start() in every page, you can change the php.ini in the [Session] section and change the line session.auto_start = 0 to session.auto_start = 1. After that, reload the configuration or restart the web sever.

:wink:
Dibyendra

Posted: Tue Aug 15, 2006 4:16 am
by RobertGonzalez
session_start() is not that hard to add to your scripts. Just make sure you call it before you send any output to the browser. No blanks spaces, no <html>, no echo's, nothing. Then you should be golden.

Posted: Tue Aug 15, 2006 4:18 am
by shiranwas
thanks