<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1038231" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1038231</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/simple-php-login-script#comment-1218946</link>
    <description> &lt;p&gt;ok solved it. &lt;/p&gt;
&lt;p&gt;incase it helps anyone else...&lt;br /&gt;
I was including my &quot;header.php&quot; page within , and the session_start() is in that header.php (so i dont have to include it in all pages) so effectively was called after html &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/eyeroll.png&quot; title=&quot;Roll eyes&quot; alt=&quot;Roll eyes&quot; class=&quot;smiley-content&quot; /&gt; &lt;/p&gt;
&lt;p&gt;:flame: PHP&lt;br /&gt;
&lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/big.png&quot; title=&quot;Laughing out loud&quot; alt=&quot;Laughing out loud&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 07 May 2007 15:53:27 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1218946 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/simple-php-login-script#comment-1218670</link>
    <description> &lt;p&gt;thanks for the redirector tip&lt;/p&gt;
&lt;p&gt;but I wouldnt want to redirect soemone from a page they bookmarked, they might think the website isnt very good or I have somehow messed with their bookmarks&lt;br /&gt;
even without them thinking that, I wouldnt want to remove customers bookmark functionality&lt;/p&gt;
&lt;p&gt;and the other problem i see with that code is what if the user hasn&#039;t logged on, and just wants to browse the packages? &lt;/p&gt;
&lt;p&gt;thanks, but there must be a simple way to work around this.&lt;br /&gt;
There must be even a &#039;run once&#039; type command or similiar I could use, where it would check if session is started and if so not to try and start it again, as with connecting to the DB, only if it hasnt already been done&lt;/p&gt;
&lt;p&gt;I will continue to search the net (groan)&lt;/p&gt;
 </description>
     <pubDate>Wed, 02 May 2007 10:22:33 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1218670 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/simple-php-login-script#comment-1218644</link>
    <description> &lt;p&gt;if included header pages with session_start() on pages with user defined dynamic content.  dont eliminate the problems, you can try something like&lt;/p&gt;
&lt;p&gt;if (isset($_SESSION[&#039;%var%&#039;])) {&lt;br /&gt;
    $username = $_SESSION[&#039;%var%&#039;];&lt;br /&gt;
} else {&lt;br /&gt;
    Header (&quot;Location:http://www.yoursite.com/yourpage.ext&quot;);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;which will redirect the person to a page where the session_start() code is.&lt;/p&gt;
&lt;p&gt;there are many more defined methods of doing this, these are just simple examples.&lt;/p&gt;
 </description>
     <pubDate>Tue, 01 May 2007 23:31:07 +0000</pubDate>
 <dc:creator>mmoglobal</dc:creator>
 <guid isPermaLink="false">comment 1218644 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/simple-php-login-script#comment-1218614</link>
    <description> &lt;p&gt;ok thanks for the tips&lt;br /&gt;
I am back to messing with php to try and get it working myself. (phew)&lt;/p&gt;
&lt;p&gt;one thing I am stuck with&lt;br /&gt;
the code that connects to the DB and the &#039;session_start();&#039; code, if I put that in the home page what if the user has bookmarked the products page and returns one day but doesnt go to the homepage? those commands are not executed and the products page doesn&#039;t work as the DB hasn&#039;t been accessed!&lt;/p&gt;
&lt;p&gt;I have a header page, which is the site nav links, logo etc, that is included in EVERY page, but if I put the (above) code in there, whenever I go through the site to another page it returns an error that the DB has already been accessed and the session_start cannot be done twice.&lt;br /&gt;
any ideas/thoughts on a resolve for this?&lt;/p&gt;
&lt;p&gt;much appreciated&lt;/p&gt;
 </description>
     <pubDate>Tue, 01 May 2007 14:00:15 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1218614 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/simple-php-login-script#comment-1218268</link>
    <description> &lt;p&gt;To be honest, a login script being written for you isn&#039;t going to do much for you...what kind of things are you going to do for your &#039;members&#039;?  Serve them static content?  The point of being a member or &#039;logging in&#039; to somewhere is that the page is then personalized according to your needs and preferences... you can&#039;t do that without scripting.&lt;/p&gt;
&lt;p&gt;Try hotscripts.com, or Google it.  There a million pre-written ways to do what you want.  But I, along with everyone else, think you should take the time to learn...then your site will have that customized feel.&lt;/p&gt;
&lt;p&gt;I was once in your shoes, looking for a &#039;login script&#039;...and I ended up having someone write one for me, but it got me nowhere.  After I realized that, I sat down and read books from SitePoint.com, and articles all over the place...at this point I&#039;m very good with PHP (but by no means an expert).&lt;/p&gt;
&lt;p&gt;One of your best resources can be the online docs at PHP.net&lt;/p&gt;
 </description>
     <pubDate>Mon, 23 Apr 2007 06:59:54 +0000</pubDate>
 <dc:creator>brady.k</dc:creator>
 <guid isPermaLink="false">comment 1218268 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/simple-php-login-script#comment-1218267</link>
    <description> &lt;p&gt;thanks for the advice!&lt;/p&gt;
&lt;p&gt;I will shortly be learning PHP in a more in depth approach&lt;br /&gt;
but for now, i just need to get a login script working on my current site.&lt;/p&gt;
&lt;p&gt;once that&#039;s in place i can sit back a bit and have some time to look at the ins and outs of PHP a bit more&lt;/p&gt;
&lt;p&gt;cheers&lt;/p&gt;
 </description>
     <pubDate>Mon, 23 Apr 2007 06:20:58 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1218267 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/simple-php-login-script#comment-1218261</link>
    <description> &lt;p&gt;I don&#039;t have a simple tutorial for you, but if you&#039;re serious about learning PHP and MySQL, I recommend the book &lt;a href=&quot;http://www.amazon.com/MySQL-Dynamic-Visual-QuickPro-Guides/dp/0321336577&quot; class=&quot;bb-url&quot;&gt;PHP and MySQL for Dynamic Websites&lt;/a&gt;. I have the first edition and I finally buckled down and read it. I learned a ton. Toward the end the author tells you how to do a simple ecommerce site, CMS (which includes registration) and another thing (I can&#039;t remember what it was). You might even be able to find it at a library. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 23 Apr 2007 00:14:51 +0000</pubDate>
 <dc:creator>teammatt3</dc:creator>
 <guid isPermaLink="false">comment 1218261 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
