php - Include File - session error -
for small comments widget. i'm trying include widget .php file @ wish- in practical way user just:
<?php include "comments.php"; ?>
i'm trying create admin-login-panel right widget, offer logged admin delete posts (and more other options).
the problem is: have start use $_session
, prevent admin having login on , on again @ each change / page-refresh. but, using sessions inside widget can see header , session warnings ...olready started...
....and on.
is not option force user put pages top 'session_starts', i'd keep things simple. php-include
widget.
can still keep trying php sessions or should try else? in advance suggestion.
alright, information have given us, problem is: php sessions uses special cookie sent in header. must perform session_start(); before other content sent browser, can set cookie in header. unfortunately, looks have start session outside of including of widget.
why starting session outside of widget not option? not have control on other php pages?
Comments
Post a Comment