What is the correct way to make a SELECT in PHP and MYSQL?
<p>How can i do a select from a variable received from a form? </p>

<p>I have the following code but i think that i cannot do this : '%'.$texto.'%' </p>

<pre><code>$busqueda=$_POST['texto'];
$tipo=$_POST['tipo'];

if($tipo='titulo')
    $res=mysql_query("SELECT * FROM LIBRO WHERE LI_TITULO like '%'.$texto.'%'",$conexion);
</code></pre>

<p>What should i do? Thank you for your time.</p>
