sylesia Posted November 25, 2006 Share Posted November 25, 2006 Ok, so I am working on a site where my goal is to use sessions so that I can keep track of people to make sure they logged in and to also carry over information so that I have it page to page. My issue comes to this, alot of the pages where done in HTML since my partner only knows that, and it made creating the sites alot easier. Since sessions are only in php, I try to compensate for it by using the Request() function from a php page. My code looks like this <?session_start();$_SESSION['option'] = 'car';require("http://localhost/srh/MS_III_Page.html");?>the html allows user to select from a drop down box an option, then press submit, sending them to this new page<? session_start(); $user = $_Session['option']; echo $user;?>problem is, nothing shows. I try to echo anything else and it shows, including when I doecho $_POST['OptionSelected'];which is in the html file that was read in before directing to this page. I am so lost, that any help would be so greatly appreciated. Link to comment https://forums.phpfreaks.com/topic/28397-session-difficulty/ Share on other sites More sharing options...
Stooney Posted November 25, 2006 Share Posted November 25, 2006 I had the same prob when I was learning. $_SESSION must always be caps, so change this:$user = $_Session['option']; to this:$user = $_SESSION['option']; Link to comment https://forums.phpfreaks.com/topic/28397-session-difficulty/#findComment-129916 Share on other sites More sharing options...
sylesia Posted November 25, 2006 Author Share Posted November 25, 2006 You are kidding me, that was all it was? I didn't even notice the small case. THANK YOU! Link to comment https://forums.phpfreaks.com/topic/28397-session-difficulty/#findComment-129917 Share on other sites More sharing options...
sylesia Posted November 25, 2006 Author Share Posted November 25, 2006 Ok, along those same lines, it works for a while, I can go thru a few pages, but than when I submit a form (from html read thru php again), I get this warningWarning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Program Files\xampp\htdocs\srh\yellow1.php:1) in C:\Program Files\xampp\htdocs\srh\yellow1.php on line 2my start php looks like this <? session_start(); $strongDimension = $_POST['StrongDimensions'];...?>any ideas why it might be giving me such a warning?I checked my HTML file I read in, and found nothing there that should be a problem. I read in an HTML file in a php before this one, and the next php has no issues with session_start(), so I do not think its because my HTML outputs Link to comment https://forums.phpfreaks.com/topic/28397-session-difficulty/#findComment-129922 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.