Problemas con php

Hola. Aclaro que soy aficionado, hago sólo mi web.
Estos códigos php funcionaban en otros hosting pero en 000webhost no. A pesar de haber cambiado a versión 5.2 en el panel.
Me gustaría saber que puede estar mal.
Este es un formulario de mail metido dentro de un html

<?php
if (!isset($_POST['email'])) {
?>
 <form action="<?=$_SERVER['PHP_SELF']?>" method="post">
   Nombre<br>
	 <label>
      <input name="nombre" type="text" size="45"/>
    </label>
    <br>Email<br>
		 <label>
     <input name="email" type="text" size="45"/><br><br>
    </label>
<br>Mensaje<br>
<label>
<textarea name="mensaje" rows="6" cols="45">
</textarea>
    </label>
<br><br>
    <input type="reset" value="Borrar" />
    <input type="submit" value="Enviar" />
  </form>
<?php
}else{
  $mensaje="Mensaje del formulario de contacto de usuario.com.ar";
  $mensaje.= "\nNombre: ". $_POST['nombre'];
  $mensaje.= "\nEmail: ".$_POST['email'];
  $mensaje.= "\nTelefono: ". $_POST['telefono'];
  $mensaje.= "\nMensaje: \n".$_POST['mensaje'];
  $destino= "contacto@usuario.com.ar";
  $remitente = $_POST['email'];
  $asunto = "Mensaje enviado por: ".$_POST['nombre'];
  mail($destino,$asunto,$mensaje,"FROM: $remitente");
?>
  <p><strong>Mensaje enviado.</strong></p>
<?php
}

Y este otro es de una clave para descargar archivos

<?php
$cl = $_POST['clave'];
$miclave = "gotan6002";
if($us == $mius && $cl == $miclave)
{
echo '
<a href="archivo.mp3">archivo</a>
';
}
?>

Que viene de este formulario

<form action="clave.php" method="post">
<font size="2">CLAVE <input type="password" name="clave"><font size="1">
<input type="submit" value="descargar">

Gracias por la ayuda!

Hi !

Please switch to PHP 5.6 and try again. If the issue persists, what error(s) do you get?

Hola!
En el formulario de mail cuando subo el archivo al hosting aparece “mensaje enviado” que debería aparecer luego de mandar el mail. Cuando intento mandarlo me pone error 404 y junto al dominio me pone esto /<?=$_SERVER[%27PHP_SELF%27]?>
En el formulario con clave me pone
**Notice** : Undefined variable: mius in **/storage/ssd3/911/7437911/public_html/clave.php** on line **20**
**Notice** : Undefined variable: us in **/storage/ssd3/911/7437911/public_html/clave.php** on line **20**
Ya lo cambié a php 5.6 pero sigue igual

  1. In order for your files to be parsed as PHP scripts, their extension must be .php I have fixed this issue by registering HTML files as PHP types in: /public_html/.htaccess

  2. **Notice** : Undefined variable: mius in **/storage/ssd3/911/7437911/public_html/clave.php** on line **20**
     
    **Notice** : Undefined variable: us in **/storage/ssd3/911/7437911/public_html/clave.php** on line **20**
     
    These errors occur because variables mius and us are not defined before parsing line 20 in clave.php.

Se solucionó!
Agregando al .htaccess esto: AddType application/x-httpd-php .html .htm
y con las variables mius y us había copiado el código de un tutorial y se me olvidó borrar donde pedía usuario, que yo no nocesitaba.
Gracias por la ayuda Teodor!
Saludos!

We’re happy the problem has been solved! :blush: