Ir al contenido


Foto

¿Donde pongo este código? PHP


  • Por favor identifícate para responder
2 respuestas en este tema

#1 cannabis

cannabis

    Advanced Member

  • Miembro Platino
  • PipPipPip
  • 257 mensajes
  • LocationMéxico

Escrito 04 abril 2010 - 08:54

En la página contactscript.php, en donde se verifican los datos del formulario de contacto, creo una variable

$var="Correo electrónico incorrecto ES LA PRUEBA";
header("location: EmailIncorrecto.php?mensaje=$var");


Con el código

$valor = $_GET['mensaje'];
echo "El valor de la variable mensaje es: $valor";

logro leer el valor de la variable. Hasta aquí no hay problema.

El problema que tengo es que copeé copié un ejemplo puesto en Internet y no sé en qué parte del script colocar el código anterior.

EmailIncorrecto.php:

<?php
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Error</title>
<link REL="SHORTCUT ICON" HREF="http://www.fikse.com...es/tools1.ico">
<script type="text/javascript">
function showLightbox() {
document.getElementById('over').style.display='block';
document.getElementById('fade').style.display='block';
}
function hideLightbox() {
document.getElementById('over').style.display='none';
document.getElementById('fade').style.display='none';
}
</script>
<style type="text/css">
body {
background-color: #FFFFFF;
font-family: "Trebuchet MS", Tahoma, Verdana;
font-size: 14px;
// font-size: 12px;
font-weight: normal;
color: #666666;
margin: 10px;
padding: 0;
}
.fadebox {
display: none;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index:1001;
-moz-opacity: 0.8;
opacity:.80;
filter: alpha(opacity=80);
}
.overbox {
display: none;
position: absolute;
top: 25%;
left: 25%;
width: 50%;
height: 50%;
z-index:1002;
overflow: auto;
}
#content {
background: #FFFFFF;
border: solid 3px #CCCCCC;
padding: 10px;
}
</style>
</head>
<body>

<!--
<p><strong>Lightbox</strong> es un script muy popular del cual hemos comentado en <a href="http://blog.unijimpe...tes/">Lightbox: imágenes Emergentes</a> que permite mostrar imágenes y contenido en ventanas que se superponen sobre todo el web. Este script y otros que tienen la misma funcionalidad están basados en frameworks Javascript, esta vez crearemos el efecto <em>Lightbox</em> pero sin necesidad de scripts adicionales. </p>
-->

<!--
<p><a href="javascript:showLightbox();">Show LightBox</a></p>
-->

<body onload="showLightbox()">
<div id="over" class="overbox">

<div id="content">
¡Error!<br />
Verifique los datos por favor<br /><br />
<a href="http://www.fikse.com...tml">Cerrar</a>
</div>

</div>
<div id="fade" class="fadebox">&nbsp;</div>
</body>
</html>


¿Algún alma caritativa que pueda ayudarme?


Salud.
  • 0

#2 enecumene

enecumene

    Webmaster

  • Administrador
  • 7.419 mensajes
  • LocationRepública Dominicana

Escrito 04 abril 2010 - 09:01

Hola Cannabis, creo que te equivocaste de archivo php, el que muestras tiene que ver con el LightBox de imágenes. *-)

Saludos.
  • 0

#3 cannabis

cannabis

    Advanced Member

  • Miembro Platino
  • PipPipPip
  • 257 mensajes
  • LocationMéxico

Escrito 04 abril 2010 - 09:04

No lo creo mi estimado enecumene.

Este es el ejemplo. Simplemente le cambié algunas cosas para adaptarlo a mi página.


Salud.

  • 0




IP.Board spam blocked by CleanTalk.