<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1031997" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1031997</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-form-question#comment-1187458</link>
    <description> &lt;p&gt;echo out the sql string after concatenation to see if it is what you expect.&lt;/p&gt;
 </description>
     <pubDate>Thu, 08 Dec 2005 08:05:02 +0000</pubDate>
 <dc:creator>chrishirst</dc:creator>
 <guid isPermaLink="false">comment 1187458 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-form-question#comment-1187388</link>
    <description> &lt;p&gt;Hmm thanks for the replys. As I said I had been racking my brain most of the night trying to get it right, and had already tried the suggested. I&#039;ll post the full code too see if it makes it more understandable.&lt;/p&gt;
&lt;p&gt;The Form&lt;br /&gt;
index.html&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;Untitled Document&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=iso-8859-1&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;body bgcolor=&amp;quot;#FFFFFF&amp;quot; text=&amp;quot;#000000&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;form action=&amp;quot;search_gigs.php&amp;quot; method=&amp;quot;post&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Search:&amp;lt;/b&amp;gt; &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;search&amp;quot; size=&amp;quot;20&amp;quot; maxlength=&amp;quot;200&amp;quot; /&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; value=&amp;quot;Search&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/div&gt;&#039; &lt;/p&gt;
&lt;p&gt;The Submitter&lt;br /&gt;
search_gigs.php&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;$var&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;//here 3 means 3days&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$link &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;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;dbun&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;dbpw&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&amp;nbsp; or die(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Could not connect&quot;&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;mysql_select_db&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;dbname&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) or die(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Could not select database&quot;&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;$sql&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;SELECT *, DATE_FORMAT(date_time,&quot;%M, %Y&quot;) as emon_year, DATE_FORMAT(date_time,&quot;%D&quot;) as &lt;br /&gt;&lt;br /&gt;edate,DATE_FORMAT(date_time,&quot;%H:%i&quot;) as etime FROM lordlover WHERE (who = $_POST[&quot;search&quot;]) OR (city = $_POST[&quot;search&quot;])&#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;$sql&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;.=&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; ORDER BY date_time ASC&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$result &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_query&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$sql&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) or die(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;Query failed&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;br /&gt;echo &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;lt;table width=100% border=0 cellspacing=0 cellpadding=0&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;echo &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;lt;tr&amp;gt;&amp;lt;td width=12%&amp;gt;&amp;lt;b&amp;gt;Date&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td width=12%&amp;gt;&amp;lt;b&amp;gt;Time&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td width=12%&amp;gt;&amp;lt;b&amp;gt;Who&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td &lt;br /&gt;&lt;br /&gt;width=12%&amp;gt;&amp;lt;b&amp;gt;Venue&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td width=12%&amp;gt;&amp;lt;b&amp;gt;City&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td width=12%&amp;gt;&amp;lt;b&amp;gt;Support&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td width=12%&amp;gt;&amp;lt;b&amp;gt;Price&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td &lt;br /&gt;&lt;br /&gt;width=12%&amp;gt;&amp;lt;b&amp;gt;Tickets&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$cmon_year&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;while (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$line &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_fetch_array&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$result&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;MYSQL_ASSOC&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)) {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;//print_r($line);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$cmon_year &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;!= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$line&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;emon_year&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;\t&amp;lt;tr&amp;gt;&amp;lt;td colspan=8&amp;gt;&amp;lt;B&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$line&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;emon_year&#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;lt;/B&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$cmon_year&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$line&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;emon_year&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;\t&amp;lt;tr&amp;gt;\n&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;lt;td width=12%&amp;gt;&amp;amp;nbsp;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$line&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;edate&#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;lt;/td&amp;gt;&amp;lt;td width=12%&amp;gt;&amp;amp;nbsp;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$line&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;etime&#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;lt;/td&amp;gt;&amp;lt;td &lt;br /&gt;&lt;br /&gt;width=12%&amp;gt;&amp;lt;b&amp;gt;&amp;amp;nbsp;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$line&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;who&#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;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td width=12%&amp;gt;&amp;amp;nbsp;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$line&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;venue&#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;lt;/td&amp;gt;&amp;lt;td &lt;br /&gt;&lt;br /&gt;width=12%&amp;gt;&amp;amp;nbsp;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$line&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;city&#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;lt;/td&amp;gt;&amp;lt;td width=12%&amp;gt;&amp;amp;nbsp;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$line&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;support&#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;lt;/td&amp;gt;&amp;lt;td &lt;br /&gt;&lt;br /&gt;width=12%&amp;gt;&amp;amp;nbsp;&amp;amp;pound;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$line&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;price&#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;lt;/td&amp;gt;&amp;lt;td width=12%&amp;gt;&amp;amp;nbsp;&amp;lt;a href=&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$line&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;url&#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;&amp;lt;b&amp;gt;Buy Tickets&amp;lt;/b&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&lt;br /&gt;}&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;echo &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;lt;/table&amp;gt;\n&quot;&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;mysql_close&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$link&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
 </description>
     <pubDate>Wed, 07 Dec 2005 18:34:43 +0000</pubDate>
 <dc:creator>peanut</dc:creator>
 <guid isPermaLink="false">comment 1187388 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-form-question#comment-1187375</link>
    <description> &lt;p&gt;If you change the form method to GET you can use the $_GET[&#039;search]&#039; option instead. This also means you can create links directly to search qeuries using a link like &lt;a href=&quot;http://www.domain.com/search.php?search=Leeds&quot; class=&quot;bb-url&quot;&gt;domain.com/search.php?search=Leeds&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 07 Dec 2005 15:38:55 +0000</pubDate>
 <dc:creator>KeithMcL</dc:creator>
 <guid isPermaLink="false">comment 1187375 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-form-question#comment-1187360</link>
    <description> &lt;p&gt;Chris is correct, you have to access the variable that is being POSTed by the form. You were pretty close to the answer though!&lt;/p&gt;
&lt;p&gt;Take a look at: &lt;a href=&quot;http://uk2.php.net/variables.external&quot; class=&quot;bb-url&quot;&gt;http://uk2.php.net/variables.external&lt;/a&gt; for the official documentation, good luck!&lt;/p&gt;
 </description>
     <pubDate>Wed, 07 Dec 2005 12:47:01 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1187360 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-form-question#comment-1187357</link>
    <description> &lt;p&gt;= $_POST[&#039;search&#039;]&lt;/p&gt;
 </description>
     <pubDate>Wed, 07 Dec 2005 11:39:07 +0000</pubDate>
 <dc:creator>chrishirst</dc:creator>
 <guid isPermaLink="false">comment 1187357 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
