Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>PHP is one of those language that allows you to break in and out of the parser and include sections, sometimes long ones, of unprocessed raw text. Anything outside of PHP's <code>&lt;?php … ?&gt;</code> blocks is treated as plain text and output as-is.</p> <p>You have in your form this line:</p> <pre><code>&lt;input value=$tmp type="hidden" name="search"&gt; </code></pre> <p>This will appear as exactly that in your rendered HTML because the entire line exists outside of the remit of PHP's code parser. To make the variable output in your code, you need to enclose it in <code>&lt;?php … ?&gt;</code> tags and echo the value like this:</p> <pre><code>&lt;input value=&lt;?php echo $tmp ?&gt; type="hidden" name="search"&gt; </code></pre> <p>If you are on a server with 5.4+ or short_open_tags enabled, you can use this shorter syntax:</p> <pre><code>&lt;input value=&lt;?=$tmp?&gt; type="hidden" name="search"&gt; </code></pre> <p>Additionally, it's good practice to always enclose HTML attribute values in quotation marks, so I would recommend you use this line for completeness:</p> <pre><code>&lt;input value="&lt;?php echo $tmp ?&gt;" type="hidden" name="search"&gt; </code></pre> <p>As a last note, the <code>mysql_*</code> functions are (semi-)deprecated and as a result are no longer recommended for use. PHP has comes with a much faster library called the MySQL Improved Extension (or MySQLi) which is broadly similar to the library you're using, but with <code>mysqli_connect</code>, <code>mysqli_select_db</code>, <code>mysqli_query</code>, etc, and a much greater range of functionality available. I suggest you switch to using these functions as soon as is feasible in your project as the performance and security benefits alone make it worthwhile.</p> <blockquote> <p>References:</p> <ul> <li><a href="http://uk1.php.net/mysqli" rel="nofollow">http://uk1.php.net/mysqli</a></li> </ul> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload