Learning PHP and MySQL

Example 14-11 Seeing the results of magic quotes

<?php
$search
=$_GET[search];
$self=$_SERVER['PHP_SELF'];
if  (
$search  !=  NULL  )
{
  
echo  "The  search  string  is:  <strong>$search</strong>.";
}
else
{
   
echo  ("<form  action=\"$self\"  ");
   echo  (
'method="get">
              <label>  Search:  <input  type="text"  name="search"  id="search">  </label>
              <input  type="submit"  value="Go!">
              </form>
              '
);
}
?>

Posted by on 09/25 at 02:49 PM

Next entry: Example 14-12 Checking for magic quotes

Previous entry: Example 14-10 Suppressing the standard database error message

<< Back to main