<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1022528" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1022528</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/small-php-problem#comment-1138937</link>
    <description> &lt;p&gt;wow, alot of responses&lt;/p&gt;
&lt;p&gt;I think &#039;ll use method three&lt;/p&gt;
&lt;p&gt;cheers again&lt;/p&gt;
 </description>
     <pubDate>Thu, 09 Oct 2003 00:55:04 +0000</pubDate>
 <dc:creator>Khanny</dc:creator>
 <guid isPermaLink="false">comment 1138937 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/small-php-problem#comment-1138908</link>
    <description> &lt;p&gt;You can embed single deminsional arrays within double quoted strings.  Simply ommit the single quotes within the array&#039;s key.&lt;/p&gt;
&lt;p&gt;echo &quot;Text Box Data: $_POST[textbox]&quot;;&lt;/p&gt;
&lt;p&gt;And for m3rajk&#039;s method 1, you may want to consider using &lt;a href=&quot;http://www.php.net/manual/en/language.references.php&quot; class=&quot;bb-url&quot;&gt;refereces&lt;/a&gt;.  They&#039;ll save memory, and I believe are created faster than an assignment opperation (as you&#039;d be copying a memory address, rather than the contents of the address).&lt;/p&gt;
 </description>
     <pubDate>Wed, 08 Oct 2003 17:25:12 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1138908 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/small-php-problem#comment-1138902</link>
    <description> &lt;p&gt;it&#039;s this line: echo &quot;Text Box Data: $_POST[&#039;textbox&#039;]&quot;;&lt;/p&gt;
&lt;p&gt;the issue is that you can&#039;t put an array directly in. there&#039;s three ways around this.&lt;br /&gt;
1: always assign array values to something else before sticking them in&lt;br /&gt;
2: concatinate (as shown above)&lt;br /&gt;
3: use {}&lt;/p&gt;
&lt;p&gt;i used to always use the first. then i felt it might be better to just concatinate. at that point i pulled a lot out of some pages making the code look a lot better, but then someone put me onto the third. now i&#039;ve sdecided the best thing is 2 or 3 dependingon the situation. i&#039;ll let you decide which is better and what to do on your own, because i&#039;m thuroughly convinced it&#039;s primarily a personal preference considering the argument i saw at a diff board about how to fix a problem someone had based on this.&lt;/p&gt;
&lt;p&gt;the best thing i can do is give you an example of each of the ways not already exampled for you to tthen decide which you like best.&lt;/p&gt;
&lt;p&gt;however, i&#039;m going to take the liberty of combining both your pages into one.&lt;/p&gt;
&lt;p&gt;method 1: &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;$textdata&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;textbox&#039;&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;$page&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_SERVER&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;PHP_SELF&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;];&lt;br /&gt;&lt;br /&gt;if (isset(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;button&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;])){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Button Hit\&quot;; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo \&quot;&amp;lt;br&amp;gt;Text Box Data: &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$textdata&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;;&lt;br /&gt;}else{ &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &amp;lt;&amp;lt;&amp;lt;END&lt;br /&gt;&amp;lt;form method=\&quot;post\&quot; action=\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$page&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;&amp;gt;&lt;br /&gt;&amp;lt;input type=\&quot;text\&quot; name=\&quot;textbox\&quot; size=\&quot;20\&quot;&amp;gt;&lt;br /&gt;&amp;lt;input type=\&quot;submit\&quot; name=\&quot;button\&quot; value=\&quot;Submit\&quot;&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;END;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
method 2: see the other druagod&#039;s post&lt;br /&gt;
method 3: &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;if (isset(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;button&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;])){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Button Hit\&quot;; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo \&quot;&amp;lt;br&amp;gt;Text Box Data: &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;textbox&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]}&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;;&lt;br /&gt;}else{ &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &amp;lt;&amp;lt;&amp;lt;END&lt;br /&gt;&amp;lt;form method=\&quot;post\&quot; action=\&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_SERVER&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;PHP_SELF&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]}&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;&amp;gt;&lt;br /&gt;&amp;lt;input type=\&quot;text\&quot; name=\&quot;textbox\&quot; size=\&quot;20\&quot;&amp;gt;&lt;br /&gt;&amp;lt;input type=\&quot;submit\&quot; name=\&quot;button\&quot; value=\&quot;Submit\&quot;&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;END;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;fyi: using $_SERVER[&#039;PHP_SELF&#039;] returns the page you have, therefore you can now rename the page without ever braking the form.&lt;/p&gt;
 </description>
     <pubDate>Wed, 08 Oct 2003 15:28:06 +0000</pubDate>
 <dc:creator>m3rajk</dc:creator>
 <guid isPermaLink="false">comment 1138902 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/small-php-problem#comment-1138892</link>
    <description> &lt;p&gt;try it like this i took the habit of not putting arrays in the string directly but use the concatenation operator&lt;/p&gt;
&lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote:&lt;br /&gt;
&amp;lt;?&lt;br /&gt;
if (isset($_POST[&#039;button&#039;]))&lt;br /&gt;
{&lt;br /&gt;
echo &quot;Button Hit&quot;;&lt;br /&gt;
echo &quot;Text Box Data:&quot;.$_POST[&#039;textbox&#039;];&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{ echo &quot;Button Not Hit&quot;; }&lt;br /&gt;
?&amp;gt;
&lt;/p&gt;&lt;/blockquote&gt;
 </description>
     <pubDate>Wed, 08 Oct 2003 13:14:52 +0000</pubDate>
 <dc:creator>druagord</dc:creator>
 <guid isPermaLink="false">comment 1138892 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
