Ver Mensaje Individual
  #3 (permalink)  
Antiguo 28/06/2011, 08:45
guillermo90
 
Fecha de Ingreso: julio-2009
Mensajes: 104
Antigüedad: 15 años, 7 meses
Puntos: 0
Respuesta: Campos obligatorios javascript

Amigos he hecho un codigo en el cual los alerta funciona perfecto en una maquina y en la otraa no, es rarisimo porque no se que pasa.

El codigo es:
<?php
session_start();
include_once("../includes/procs.php");
include_once('../includes/tiemposession.php');
include_once('../includes/conexiones.php');
include_once("../includes/clases.php");
//************************************************** **************************************************
if (!es_usuario_habilitado($_SESSION['idusuario'])) {exit;}
//************************************************** **************************************************
$sitio=limpia($_POST['sitio']);
$derechosregistrados=limpia($_POST['derechosregistrados']);
$categoriaweb=limpia($_POST['categoriaweb']);
$comentario=limpia($_POST['comentario']);
//************************************************** **************************************************
conectarse();
$idusuario=limpia($_SESSION['idusuario']);
$saldo=saldo($idusuario);
$empresa=$_SESSION['empresa'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?php echo $empresa." - Inscripcion al concurso";?></title>
<link href="stylo0.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="calendar.css">
<script language="JavaScript" src="calendar_eu.js"></script>
<style type="text/css">
.Estilo5 {color: #990000}
.style1 {font-size: 18px}
</style>
</head>
<body>
<?php
include("cabecera.php");
include("barrausuario.php");
?>
<table width="831" height="76" border="0" align="center" class="pagina" >
<tr>
<td width="825" height="48" align="center" valign="top" class="tdcentro"><div class="barras1">Inscripcion al concurso</div>
<p>&nbsp;</p>
<table width="674" border="1">
<tr>
<td height="172"><div align="center">
<form action="concursoinscripcion.php" method="post">
Usuario:*
<span class="ingreso">
<input type="text" name="usuario" size="20" disabled="disabled" value="<?php print $usuario ?>" />
</span><br />
Sitio web participante:*
<input type="text" name="sitio" size="16" value="<?php print $sitio ?>"/>
<br />
¿Tenes los derechos de la obra registrados?:*
<input type="text" name="derechosregistrados" size="16" value="<?php print $derechosregistrados ?>"/>
<br />
Categoria del sitio:*
<input type="text" name="categoriaweb" size="16" value="<?php print $categoriaweb ?>"/>
<br />
Comentario:*
<textarea name="comentario" cols="30" rows="5"><?php print $comentario ?></textarea>
<br />
<input name="submit" type="submit" value="inscribirme" />
</form>
<?
if (isset($_POST['submit']))
{
$xerror='';
if (empty($_POST['sitio']) and $xerror=='') $xerror="La inscripcion actualmente se encuentra cerrada";
if (empty($_POST['derechosregistrados']) and $xerror=='') $xerror="La inscripcion actualmente se encuentra cerrada";
if (empty($_POST['categoriaweb']) and $xerror=='') $xerror="La inscripcion actualmente se encuentra cerrada";
if (empty($_POST['comentario']) and $xerror=='') $xerror="La inscripcion actualmente se encuentra cerrada";
if (empty($xerror))
{
//Estoy recibieno el formulario, compongo el cuerpo
$cuerpo = "Formulario enviado\n";
$cuerpo .= "Usuario: " . $HTTP_POST_VARS["<?php print $usuario ?>"] . "\n";
$cuerpo .= "Sitio web participante: " . $HTTP_POST_VARS["sitio"] . "\n";
$cuerpo .= "¿Tenes los derechos de la obra registrados?: " . $HTTP_POST_VARS["derechosregistrados"] . "\n";
$cuerpo .= "Categoria del sitio: " . $HTTP_POST_VARS["categoriaweb"] . "\n";
$cuerpo .= "Breve comentario: " . $HTTP_POST_VARS["comentario"] . "\n";
//mando el correo...
mail("[email protected]. ar","Inscripcion recibida",$cuerpo);
mensaje('La inscripcion actualmente se encuentra cerrada');
}
else
{
mensaje($xerror);
}
}
?>
</div></td>
</tr>
</table>
<p><span class="Estilo5">La inscripcion actualmente se encuentra cerrada </span></p>
<tr align="center" valign="middle">
<th width="825" height="20" align="center" valign="middle" scope="row">
<?php
//include("barravacia.php");
include("pie.php");
?>
</td>
</tr>
</table>
</body>
</html>

Mil gracias a todos.