<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1022281" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1022281</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/loginsession-handling#comment-1137419</link>
    <description> &lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Header&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Location:_/customer.php\&quot;);&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://ca.php.net/manual/en/function.header.php&quot; class=&quot;bb-url&quot;&gt;http://ca.php.net/manual/en/function.header.php&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Sun, 07 Sep 2003 16:52:29 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1137419 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/loginsession-handling#comment-1137416</link>
    <description> &lt;p&gt;when i run the script, i get an error on line 10 (the header) and line 6 (header when i take out the session stuff).  whats wrong with that?&lt;/p&gt;
 </description>
     <pubDate>Sun, 07 Sep 2003 15:30:28 +0000</pubDate>
 <dc:creator>brady.k</dc:creator>
 <guid isPermaLink="false">comment 1137416 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/loginsession-handling#comment-1137405</link>
    <description> &lt;p&gt;lol, alrighty then. *mental note to be more direct and less confusing*&lt;/p&gt;
 </description>
     <pubDate>Sun, 07 Sep 2003 05:23:22 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1137405 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/loginsession-handling#comment-1137393</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote: well you need to open the session on every single page?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;i took that as a type of &quot;will&quot;...geez, sorry.&lt;/p&gt;
&lt;p&gt;ok, thanks.&lt;/p&gt;
 </description>
     <pubDate>Sun, 07 Sep 2003 01:21:04 +0000</pubDate>
 <dc:creator>brady.k</dc:creator>
 <guid isPermaLink="false">comment 1137393 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/loginsession-handling#comment-1137384</link>
    <description> &lt;p&gt;You&#039;re not listening, Kyle.&lt;/p&gt;
&lt;p&gt;session_start(); needs to be at the beginning of EVERY page. If it isn&#039;t, you won&#039;t be able to access the information stored in the $_SESSION variables.&lt;/p&gt;
&lt;p&gt;To set session times, you would set a start time, and then when each page is accessed, start_session(); then check that variable (the time started) and if it&#039;s within the allowed time, proceed. If not, session_destroy(); and send them back to the login.&lt;/p&gt;
 </description>
     <pubDate>Sat, 06 Sep 2003 20:17:15 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1137384 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/loginsession-handling#comment-1137382</link>
    <description> &lt;p&gt;no this is the login and session starter.&lt;/p&gt;
&lt;p&gt;according to other people that i know that have worked with sessions, you can start a session, say it is open for x amount of time and then put a piece of code at the top of each page where it says you need the session to access it.  that is what i&#039;m asking about.  how do i do that time amount and check for a session at certain pages?  thanks&lt;/p&gt;
 </description>
     <pubDate>Sat, 06 Sep 2003 18:48:36 +0000</pubDate>
 <dc:creator>brady.k</dc:creator>
 <guid isPermaLink="false">comment 1137382 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/loginsession-handling#comment-1137348</link>
    <description> &lt;p&gt;well you need to open the session on every single page? If it&#039;s already there, it will continue, if not, it won&#039;t.&lt;/p&gt;
&lt;p&gt;So the first thing on every &quot;page&quot; needs to be session_start(); and then do whatever you need to do.&lt;/p&gt;
 </description>
     <pubDate>Sat, 06 Sep 2003 02:15:42 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1137348 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/loginsession-handling#comment-1137346</link>
    <description> &lt;p&gt;i meant like the time it works and stuff like that&lt;/p&gt;
 </description>
     <pubDate>Sat, 06 Sep 2003 01:53:12 +0000</pubDate>
 <dc:creator>brady.k</dc:creator>
 <guid isPermaLink="false">comment 1137346 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/loginsession-handling#comment-1137343</link>
    <description> &lt;p&gt;... you make them up, don&#039;t you?&lt;/p&gt;
&lt;p&gt;I could set any session variable I wanted, including:&lt;/p&gt;
&lt;p&gt;$_SESSION[&#039;annoyingpeople&#039;] or&lt;br /&gt;
$_SESSION[&#039;pigsfeet&#039;]&lt;/p&gt;
 </description>
     <pubDate>Sat, 06 Sep 2003 01:25:01 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1137343 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Re: Login/Session Handling</title>
    <link>https://www.webmaster-forums.net/serverside-scripting/loginsession-handling#comment-1137341</link>
    <description> &lt;p&gt;i don&#039;t know them all, but here&#039;s some help... &lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$dbh &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_connect &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;localhost\&quot;, \&quot;...\&quot;, \&quot;...\&quot;) or die (&#039;Database failure: &#039; . mysql_error(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$dbh&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;));&lt;br /&gt;mysql_select_db (\&quot;customer\&quot;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$search&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=mysql_query(\&quot;SELECT * FROM customer WHERE username=&#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$username&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039; AND password=&#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$password&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;); // this does what you want. it returns only those entries where the username and pw match what was entered&lt;br /&gt;if (mysql_num_rows(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$search&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)==1) { /// if you found the person&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; session_start();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; session.name(&#039;session&#039;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_SESSION&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;username&#039;]=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$username&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_SESSION&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;password&#039;]=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$password&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Header(\&quot;Location:&amp;nbsp; &amp;lt;a href=\&quot;http://.../customer.php\&quot; class=\&quot;bb-url\&quot;&amp;gt;http://.../customer.php&amp;lt;/a&amp;gt;\&quot;);&lt;br /&gt;}&lt;br /&gt;else {&lt;br /&gt;&amp;nbsp; echo(&#039;Wrong username.&#039;);&lt;br /&gt;mysql_close(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$dbh&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Sat, 06 Sep 2003 00:59:29 +0000</pubDate>
 <dc:creator>m3rajk</dc:creator>
 <guid isPermaLink="false">comment 1137341 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
