title: Validation Error: Bad value for attribute href on element a: Illegal character in query: not a URL code point
body: <p>I am pulling database information and displaying it in a table, the content of the title column is linked to a dynamic page. It all works perfectly but when validating my output page with the W3C Validator I get the following error and have no idea how to fix it!</p>
  
  <blockquote>
    <p>Bad value newpage.php?url= DATABASE INFORMATION for attribute href on element a: Illegal character in query: not a URL code point.</p>
  </blockquote>
  
  <p>It then highlights the end tag for the a href ">". </p>
  
  <pre><code>&lt;?php 
      echo"&lt;table&gt;
      &lt;tr&gt;
          &lt;th&gt;Title&lt;/th&gt;
          &lt;th&gt;A&lt;/th&gt;
          &lt;th&gt;B&lt;/th&gt;
          &lt;th&gt;C&lt;/th&gt;
          &lt;th&gt;D&lt;/th&gt;
      &lt;/tr&gt;
      &lt;/table&gt;";
  
  
          if (mysqli_num_rows($SQLresult) == 0 ) 
          { 
              echo 'No results found, please try again.';
          } 
          else 
          {   
              while ($row = mysqli_fetch_assoc($SQLresult)) 
              {
                  echo "
                  &lt;table&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;a href='newpage.php?url=".$row['title']."'&gt;".$row['title']."&lt;/td&gt;
                      &lt;td&gt;".$row['A']."&lt;/td&gt;
                      &lt;td&gt;".$row['B']."&lt;/td&gt;
                      &lt;td&gt;".$row['C']."&lt;/td&gt;
                      &lt;td&gt;".$row['D']."&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;/table&gt;";
              }          
          }
  ?&gt;
  </code></pre>
  
  <p>Any help would be greatly appreciated, thanks.</p>