Foros del Web » Programando para Internet » PHP »

Problema con este codigo

Estas en el tema de Problema con este codigo en el foro de PHP en Foros del Web. veran, tengo un codijo para un libro de visitas, este es el codigo: Código: <? /********************************************/ /***SCRIPT CREADO POR Luison*************/ /***7/11/03*****VISITEN MI WEB*********/ /****http://www.codigosphp.tk****/ /****GRACIAS ...
  #1 (permalink)  
Antiguo 14/03/2010, 14:10
 
Fecha de Ingreso: febrero-2010
Mensajes: 5
Antigüedad: 14 años, 2 meses
Puntos: 0
Problema con este codigo

veran, tengo un codijo para un libro de visitas, este es el codigo:
Código:
<?
/********************************************/
/***SCRIPT CREADO POR Luison*************/
/***7/11/03*****VISITEN MI WEB*********/
/****http://www.codigosphp.tk****/
/****GRACIAS XDDDD*************************/
/*******************************************/
include("configurar.php");
if($accion=="firmar") {//si a decidido firmar el libro....
	if($enviar) {//si a pulsado enviar.....
	$fecha=date("j/m/y");
	mysql_query("INSERT into libro (nick,mensaje,valoracion,web) VALUES ('$nick','$mensaje','$valoracion','$web')") or die (mysql_error());
	echo "Gracias por firmar nuestro libro de visitas";
	}
	if(!$enviar) {//si toavia no a pulsao enviar se muestra el formulario
	echo "<div align=\"center\"><form method=\"POST\" action=\"libro.php?accion=firmar\">
       <b>.:Nick:.</b><br>
  	<input type=\"text\" name=\"nick\" size=\"20\"><br>
  	<b>.:Tu Web:.<br>
  	<input type=\"text\" name=\"web\" size=\"20\"><br>
  	.:Valoracion:.<br>
  	<select size=\"1\" name=\"valoracion\">
  	<option>10</option>
  	<option>9</option>
  	<option>8</option>
  	<option>7</option>
  	<option>6</option>
  	<option>5</option>
  	<option>4</option>
 	<option>3</option>
  	<option>2</option>
  	<option>1</option>
  	</select><br>
  	.:Mensaje:.<br>
  	<textarea rows=\"5\" name=\"mensaje\" cols=\"20\"></textarea></b><br>
  	<input type=\"submit\" value=\"Enviar\" name=\"enviar\"></p>
	</form></div>";
	}
}
if(!$accion) {
 $consulta=mysql_query("SELECT nick,mensaje,valoracion,web from libro order by id desc") or die (mysql_error());
 $lineas=mysql_query("SELECT nick,mensaje,valoracion,web from libro");
 $total=mysql_num_rows($lineas);
 echo "<center>";
 echo "<a href=\"ringoBook.php?accion=firmar\"><b>.:Firmar Libro:.</b></a><br>";
 echo "<b>Numero de firmas:</b>$total";
 echo"</center>";
 while($sql=mysql_fetch_array($consulta)) {
 $mensaje=$sql[mensaje];
 /***Emoticonos********************************************/
 $mensaje = str_replace(":D","<img src=\"emoticon/alegre.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":8","<img src=\"emoticon/asustado.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":P","<img src=\"emoticon/burla.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":S","<img src=\"emoticon/confundido.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":!","<img src=\"emoticon/exclamacion.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":>","<img src=\"emoticon/flecha.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":(1","<img src=\"emoticon/demonio.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":(2","<img src=\"emoticon/demonio2.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":?","<img src=\"emoticon/duda.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":y","<img src=\"emoticon/idea.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":-(","<img src=\"emoticon/enojado.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(";)","<img src=\"emoticon/guino.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":'(","<img src=\"emoticon/llorar.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":?","<img src=\"emoticon/pregunta.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":lol","<img src=\"emoticon/lol.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":M","<img src=\"emoticon/moda.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":|","<img src=\"emoticon/neutral.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":)","<img src=\"emoticon/risa.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":-)","<img src=\"emoticon/sonrisa.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":R","<img src=\"emoticon/sonrojado.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":O","<img src=\"emoticon/sorprendido.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 $mensaje = str_replace(":(","<img src=\"emoticon/triste.gif\" width=\"15\" height=\"15\">",$mensaje) ;
 /********HASTA AQUI LOS EMOTICONOS****************/
 echo "
 <table cellspacing=\"1\" style=\"border-collapse: collapse; border-left: 1px solid #F3F3F3; border-right-width: 1; border-top-width: 1; border-bottom: 1px solid #F3F3F3\" width=\"100%\">
 <tr>
 <td width=\"83%\"><a href=\"$sql[web]\" target=\"_blank\"><b>$sql[nick]</b></a></td>
 <td width=\"17%\">$sql[fecha]</td>
 </tr>
 <tr>
 <td width=\"100%\" colspan=\"2\"><b>Valoracion:</b>$sql[valoracion]<br><b>Comentarios:</b>$mensaje</td>
 </tr>
 </table>\n";
 }
}
?>
Este codigo se representa en esta pagina: http://institutocrescere.host56.com/ringoBook.php

pero como veran no aparece, por que sera, ya me fije en el CONFIG.PHP y esta bien configurado
  #2 (permalink)  
Antiguo 14/03/2010, 14:40
 
Fecha de Ingreso: febrero-2010
Mensajes: 818
Antigüedad: 14 años, 2 meses
Puntos: 55
Respuesta: Problema con este codigo

la tienes subida a la carpeta public html bajo ese nombre???

me sale error que creo que es de tipo 404
  #3 (permalink)  
Antiguo 14/03/2010, 14:45
 
Fecha de Ingreso: febrero-2010
Mensajes: 5
Antigüedad: 14 años, 2 meses
Puntos: 0
Respuesta: Problema con este codigo

Cita:
Iniciado por Death_Empire Ver Mensaje
la tienes subida a la carpeta public html bajo ese nombre???

me sale error que creo que es de tipo 404
si lo subi a esa carpeta

Etiquetas: codigos, mas
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 01:40.