Hola tengo un input en php con el nombre
<select name="item">
<option>Pc</option>
$items = $_POST['item'];
le doy que me imprima el valor
echo $items; y me imprime Pc,
ahora tengo una BD y hago un select * from tabla campo = 'Pc'
y me arroja la consulta, lo mediante PHP, Y Me arroja error.
$descrip ="select * from tabla where campo = /'.$items.'"; y me arroja
Unknown column 'Pc' in 'field list'
alguien me podria indicar por que sucede esto.
$descrip ="select * from tabla where campo = \'\".$items.\"\'"; pero tambien me arroja error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\'".Pc."\'' at line 1