![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
01/12/2013, 07:48
|
| | Fecha de Ingreso: noviembre-2013
Mensajes: 6
Antigüedad: 11 años, 2 meses Puntos: 0 | |
Respuesta: Comprobar codigo promocional Gracias NJS. Ya me redirecciona. El unico problema es que siempre me direcciona a la pagina de la clausula 'else' y no a la del 'if'. Es como si la condicion no la tuviera en cuenta.
Podrias decirme donde tengo el fallo??
Mil gracias
Codigo HTML
<!--PIN code-->
<center><b><h3><font color="#FFFFFF"> Insert the PIN Code found at the back of your Coca Cola tab !</h3></b></font>
<form action="premio.php" method="post">
<font color ="#FFFFFF"> PIN Code: </font>
<input type="text" name="code" maxlength=6 />
Codigo PHP (el codigo correcto es
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<html>
<body color="#B81321">
<?php
$pin = $_POST["code"]
if($pin==711922){
echo "<head><meta http-equiv="refresh" content="0; url=promotionW.html"></head>"
}
else {
echo "<head><meta http-equiv="refresh" content="0; url=promotionL.html"></head>"
}
?>
</body>
</html> |