<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1016980" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1016980</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/working-sessions-php#comment-1099028</link>
    <description> &lt;p&gt;I don&#039;t know what is wrong, but try this:&lt;br /&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;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;echo &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pwd&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;session_unregister&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;pwd\&quot;);&lt;br /&gt;echo &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pwd&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;session_register(\&quot;pwd\&quot;);&lt;br /&gt;echo &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pwd&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$query&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;UPDATE members SET password=&#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pwd&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039; WHERE username=&#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$uid&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;\&quot;;&lt;br /&gt;mysql_query(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$query&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;Does $pwd change?&lt;/p&gt;
 </description>
     <pubDate>Mon, 21 Jan 2002 23:28:27 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1099028 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Problem with the Sessions</title>
    <link>https://www.webmaster-forums.net/serverside-scripting/working-sessions-php#comment-1099024</link>
    <description> &lt;p&gt;I tried last night and it worked fine but today it&#039;s not? weird.&lt;/p&gt;
&lt;p&gt;Anyway, someone changes their password in a form (I called the textbox &#039;pwd&#039;) when they click submit,&lt;/p&gt;
&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;session_unregister&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;pwd\&quot;);&lt;br /&gt;session_register(\&quot;pwd\&quot;);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$query&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;UPDATE members SET password=&#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pwd&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039; WHERE username=&#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$uid&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;\&quot;;&lt;br /&gt;mysql_query(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$query&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;
&lt;p&gt;I know that it works because it doesn&#039;t sign you out (as it would if the sessions didn&#039;t overwrite) and I know that it submits to the database the problem is what it submits it just submits it as if the field was blank, here is the code for the password textbox&lt;/p&gt;
&lt;p&gt;&quot; name=&quot;pwd&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;Do you know what might be wrong here?&lt;/p&gt;
 </description>
     <pubDate>Mon, 21 Jan 2002 23:07:35 +0000</pubDate>
 <dc:creator>a_gajic</dc:creator>
 <guid isPermaLink="false">comment 1099024 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/working-sessions-php#comment-1098902</link>
    <description> &lt;p&gt;Two options:&lt;/p&gt;
&lt;p&gt;1) Don&#039;t record  in the DB.  Instead, put a \n.  Then when your printing the value to the textarea, use nl2br(). (my prefered)&lt;/p&gt;
&lt;p&gt;2) use:&lt;br /&gt;
$string = preg_replace(&quot;##i&quot;, &quot;\n&quot;, $string);&lt;/p&gt;
&lt;p&gt;PHP Docs: &lt;a href=&quot;http://www.php.net/manual/en/function.nl2br.php&quot; class=&quot;bb-url&quot;&gt;nl2br()&lt;/a&gt;, &lt;a href=&quot;http://www.php.net/manual/en/function.preg-replace.php&quot; class=&quot;bb-url&quot;&gt;preg_replace()&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 21 Jan 2002 04:04:36 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1098902 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/working-sessions-php#comment-1098876</link>
    <description> &lt;p&gt;I figured it out earlier but thanks anyway Mark.&lt;/p&gt;
&lt;p&gt;One more question to you all...&lt;/p&gt;
&lt;p&gt;I have a field called &quot;address&quot;, when someone types their address into this field it records it to the db with . When I call the address up later on though (in a textarea) it prints the &#039;s, how do I get it so it goes down a line in the textarea?&lt;/p&gt;
&lt;p&gt;Thanks again,&lt;br /&gt;
Adam.&lt;/p&gt;
 </description>
     <pubDate>Sun, 20 Jan 2002 20:38:41 +0000</pubDate>
 <dc:creator>a_gajic</dc:creator>
 <guid isPermaLink="false">comment 1098876 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/working-sessions-php#comment-1098874</link>
    <description> &lt;p&gt;Just like you do any other variable.  Just assign a value to it.&lt;/p&gt;
&lt;p&gt;Make sure you register your session variables at every page, or they will not transfer over to the next page.&lt;/p&gt;
&lt;p&gt;If you have a problem with some code, feel free to post it.&lt;/p&gt;
 </description>
     <pubDate>Sun, 20 Jan 2002 20:16:46 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1098874 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
