i'm new on stackfloww but allways i found solutions here. today is my first questions. the problem i have is this:
Parse error: syntax error, unexpected '' ' (T_CONSTANT_ENCAPSED_STRING) in D:\XAMPP\htdocs\zupa\guardar.php on line 32
i read php documentation and is for my string is from a input with just acept numbers. i make it with the next function
$(document).ready(function (){
$('#2').keyup(function (){
this.value = (this.value + '').replace(/[^0-9]/g, '');
now the problem is te sintaxis and iam on the line of craziness.
this is my code
<?php
//la funcion para conectarse cn la base de datos
//conectado con la base de datos
include('conexion.php');
$conexion=conectar();
// agarro via post las variables y las conecto al mysql
mysql_query('INSERT INTO mensajes(name,phone,comment,rate) VALUES('.$_POST['name']'
'$_POST['phone']'
'$_POST['comment']'
'$_POST['rate']')')
or die(mysql_error());
echo "dato guardado";
?>
and the error is in the line 32 wich is
'$_POST['phone']'
thank for any help!