signature16 Posted February 13, 2007 Share Posted February 13, 2007 What is wrong with this? I won't work. session_start(); if(isset($_SESSION['views'])) { $_SESSION['views'] = $_SESSION['views']+ 1; } else {$_SESSION['views'] = 1; echo "views = ". $_SESSION['views']; } Quote Link to comment Share on other sites More sharing options...
play_ Posted February 13, 2007 Share Posted February 13, 2007 any errors? Quote Link to comment Share on other sites More sharing options...
signature16 Posted February 13, 2007 Author Share Posted February 13, 2007 Nope. Just a blank white screen. Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted February 13, 2007 Share Posted February 13, 2007 try this: session_start(); if(isset($_SESSION['views'])){ $_SESSION['views'] = $_SESSION['views']+ 1; }else{ $_SESSION['views'] = 1; } echo "views = ". $_SESSION['views']; you echoed then closed the last } Quote Link to comment Share on other sites More sharing options...
signature16 Posted February 13, 2007 Author Share Posted February 13, 2007 ah. got it working. thank you, sorry for the n00b question. Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted February 13, 2007 Share Posted February 13, 2007 tis ok, you've just gotta look a lot harder. and try re-arranging your code to be like i had it, its a lot neater and easier to see. using tab is good as well. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.