Note that there are some explanatory texts on larger screens.

plurals
  1. POecho php positioning
    primarykey
    data
    text
    <p>im doing a form in this link <a href="http://jardineselectricos.com/xtatanx/contacto.php" rel="nofollow">http://jardineselectricos.com/xtatanx/contacto.php</a>, everything works fine, the form just sent me the emails when is filled but, when i recive the echo output all the website mees up. i Would like to know how i can position the output where i want. this is my code.</p> <p>HTML:</p> <pre><code>&lt;form method="post" action="contacto.php" id="form"&gt; &lt;label for="nombre"&gt;Nombre: &lt;/label&gt; &lt;input type="text" name="nombre" placeholder="Su nombre"/&gt; &lt;label for="correo"&gt;Correo electrónico: &lt;/label&gt; &lt;input type="email" name="email" placeholder="nombre@correo.com"/&gt; &lt;label for="numero-telefonico"&gt;Teléfono móvil: &lt;/label&gt; &lt;input type="text" name="telefono" placeholder="Introducir nº de telf" /&gt; &lt;label for="mensaje"&gt;Mensaje: &lt;/label&gt; &lt;textarea name="mensaje" cols="20" rows="6" placeholder="Escriba un mensaje breve..."&gt;&lt;/textarea&gt; &lt;input type="submit" id="enviar" name="enviar" value="Enviar"&gt; &lt;span id="respuesta"&gt; &lt;?php $nombre = $_POST['nombre']; $email = $_POST['email']; $numero = $_POST['telefono']; $mensaje = $_POST['mensaje']; $from = 'From: UsuarioStrategyResearch'; $to = 'jhonnatanhxc@gmail.com'; $subject = 'Contacto Strategy Research'; $body = "De: $nombre\n E-Mail: $email\n Movil: $numero\n Mensaje:\n $mensaje"; if ($_POST['enviar']) { if (mail ($to, $subject, $body, $from)) { echo '&lt;p&gt;Tu mensaje ha sido enviado, pronto nos pondrémos en contacto.&lt;/p&gt;'; } else { echo '&lt;p&gt;Ha habido un error y el mensaje no ha podido ser enviado.&lt;/p&gt;'; } } ?&gt; &lt;/span&gt; &lt;/form&gt; </code></pre> <p>The output is always place it like in the middle of the website, it doesnt change if i use an spam or div or if i positionae in the footer or everywhere, it just echo in the same place. i would appreciate your help guys thank you very much.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload