0

What happens is that when I fill the first 4 labels it "seems" to work, but when I fill all the form it says that the page which is in the action can't be found. Does it have any sense? Why is it happening? Is there any limit of information I can POST? My form looks like this:

<form action="http://www.example.com/php/"     enctype="multipart/form-data" method="POST" class="dark-matter">

<fieldset><legend><b> Datos Cliente </b></legend><label> 

 <b> Email : </b> <label> <input name="mail" type="text"  /> </label>

<b> Página : </b> <label> <input name="pagina" type="text"  />  </label>

<b> Contraseña :  </b> <label> <input name="pass" type="text"  /> </label>

<b> Teléfono :  </b> <label> <input name="telefono" type="text"  /> </label>



<b> Producto : </b> <label> <input name="product" type="text"  /> </label>

<b>  Precio mínimo : </b> <label> <input name="preciomin" type="text"  />  </label>

<b> Precio a añadir : </b>  <label> <input name="precioplus" type="text"  />  </label>

 <b> Límite X max : </b>  <label> <input name="limitex" type="text"  /> </label>

<b> Límite Y max : </b>  <label> <input name="limitey" type="text"  /> </label>

 <b> Límite Z max : </b>  <label> <input name="limitez" type="text"  /> </label>

 <b> Límite X min : </b>  <label> <input name="limitexmin" type="text"  /> </label>

<b> Límite Y min : </b>  <label> <input name="limiteymin" type="text"  /> </label>

 <b> Límite Z min : </b>  <label> <input name="limitezmin" type="text"  /> </label>

 <b> Precio material(cm3) : </b>  <label> <input name="preciomaterial" type="text"  /> </label>

<b> Precio volumen(cm3) : </b> <label> <input name="preciovolumen" type="text"  />  </label>

<b> Colores (separar colores mediante comas) : </b> <label> <input name="Color" type="text"  />  </label>

<div class="buttonHolder">
<input type="submit" value="Continuar" />
</div>
</form>

Here you have the code of the URL action:

PHP

$mail=$_POST['mail'];
$pagina=$_POST['pagina'];
$pass=$_POST['pass'];
$telefono=$_POST['telefono'];
$product=$_POST['product'];
$preciomin=$_POST['preciomin'];
$precioplus=$_POST['precioplus'];
$limitex=$_POST['limitex'];
$limitey=$_POST['limitey'];
$limitez=$_POST['limitez'];
$limitexmin=$_POST['limitexmin'];
$limiteymin=$_POST['limiteymin'];
$limitezmin=$_POST['limitezmin'];
$preciomaterial=$_POST['preciomaterial'];
$preciovolumen=$_POST['preciovolumen'];
$color=$_POST['Color'];
mysql_connect("localhost", "root", "");
mysql_select_db('wordpress');
$numero=mysql_insert_id();
$sql="INSERT INTO `wordpress`.`intermediarios` (`producto`,         `preciomaterial`, `preciovolumen`, `limitex` , `limitey`, `limitez`, `preciomin`, `precioplus` , `pagina`, `telefono`, `mail`, `pass` , `id`, `color`, `comentarios`, `limitexmin` , `limiteymin`, `limitezmin`, `intermediario`) VALUES ('$product','$preciomaterial', '$preciovolumen', '$limitex' , '$limitey', '$limitez', '$preciomin', '$precioplus' , '$pagina', '$telefono', '$mail', '$pass' , NULL , '$color', '$comentarios', '$limitexmin' , '$limiteymin', '$limitezmin' , '$numero')";
mysql_query($sql);

I'm using wordpress but I have created forms in the same page that works properly.

  • If you use WordPress why don't you use a plugin to create the form you need? – kat_indo Jul 18 '15 at 22:53
  • @kat_indo would like to choose every aspect of the form and in order to do that it seems easier not to use a plugin. Do you know any pluggin where I can adjust everything? Using my own CSS or sending hidden information? Thanks – Héctor Anadón Jul 18 '15 at 22:58
  • Most of the time I'd use [Contact Form 7](https://wordpress.org/plugins/contact-form-7/) because it's easy to set up & flexible. – kat_indo Jul 18 '15 at 23:12
  • Just be careful, your SQL request could be used for SQL injection. – Gabriel Pichot Jul 18 '15 at 23:47
  • Your form action in the code above is `action="http://www.example.com/php/"`, what is the actual page that you're trying to post to? –  Jul 19 '15 at 01:27
  • **Danger**: You are using [an **obsolete** database API](http://stackoverflow.com/q/12859942/19068) and should use a [modern replacement](http://php.net/manual/en/mysqlinfo.api.choosing.php). You are **vulnerable to [SQL injection attacks](http://bobby-tables.com/)** that a modern API would make it easier to [defend](http://stackoverflow.com/questions/60174/best-way-to-prevent-sql-injection-in-php) yourself from. – Quentin Aug 13 '15 at 12:27

0 Answers0