la 2º veran yo tengo una web :
Código PHP:
link href="estilos.css" rel="stylesheet" type="text/css"> <body bgcolor="#000000">
<table width="20%" border="0">
<tr>
<td height="23" background="fondo_for11.png">
<div align="center"><font color="#FFCC00"><strong>Q
quieres hacer?</strong></font></div></td>
</tr>
<tr>
<td height="5" class="boton23">
<form <? echo " method='get' action='$PHP_SELF' class='formu' "; ?>><select name="panel" class="boton2">
<option value="-" selected>-</option>
<option value="nuevo">Nuevo Usuario</option>
<option value="mismopueblo">Mismo pueblo</option>
<option value="login">Login</option>
<option value="edad">Misma edad</option>
</select>
<input name="submit" type="submit" class="boton" value="ELEGIR">
</td> </tr>
</table></form>
<?
$ir=$panel;
if ($panel=="-"){
?><script language="JavaScript" type="text/javascript">
function cambia(){
window.location.href = 'panel.php';
}
setTimeout("cambia()",500);</script>
<? }else{
switch($ir){
case nuevo: include("nuevo.php"); break;
case mismopueblo: include("buscar_mismopueblo.php"); break;
case login : include("login.php"); break;
case edad : include("buscar_mismaedad.php"); break;
}}
switch($acc){
/****************/case mirar:/*********************/
$pueblo=$_GET['pueblo'];
if(empty($pueblo)){
echo "<p align='center'><font color='#FFCC00'><strong>Ponga un pueblo</strong></font></p>";
}else{
$host="localhost";
$user="prueba";
$data="pruebas";
$pass="***";
include ("conexiones/conex1.php");
$link=Conectarse($host,$user,$pass,$data);
$sql = "select * from usuarios_pro1";
$result = mysql_query($sql,$link) or die("Error de la consulta $sql .<br>MySQL dice : ".mysql_error());
while($row = mysql_fetch_array($result)){
if ($row['localidad']==$pueblo){
echo "<p align='center'><font color='#FFCC00'><strong>". $row['nick']."</strong></font></p>";
}else{
echo "<p align='center'><font color='#FFCC00'><strong>No hay nadie con esa localidad</strong></font></p>";}
}
mysql_free_result($result);
mysql_close($link);
}
break;
/*************************************************/
/************/case mirar_edad: /***************/
/************************************************/
$edad=$_POST['edad'];
if(empty($pueblo)){
echo "<p align='center'><font color='#FFCC00'><strong>Ponga un pueblo</strong></font></p>";
}else{
$host="localhost";
$user="prueba";
$data="pruebas";
$pass="****";
include ("conexiones/conex1.php");
$link=Conectarse($host,$user,$pass,$data);
$sql = "select * from usuarios_pro1";
$result = mysql_query($sql,$link) or die("Error de la consulta $sql .<br>MySQL dice : ".mysql_error());
while($row = mysql_fetch_array($result)){
if ($row['edad']==$edad){
echo "<p align='center'><font color='#FFCC00'><strong>". $row['nick']."</strong></font></p>";
}else{
echo "<p align='center'><font color='#FFCC00'><strong>No hay nadie con esa localidad</strong></font></p>";}
}
mysql_free_result($result);
mysql_close($link);
}
break;
/*///////////*/ case comprobacion: /***********/
$passo=$_POST['pass'];
$nick=$_POST['nick'];
if (empty($passo)){
$error[]="<p align='center'><font color='#FFCC00'><strong>Ponga una contraseÑa</strong></font></p>";
}
if (empty($nick)){
$error[]="<p align='center'><font color='#FFCC00'><strong>Ponga Su nick</strong></font></p>";
}
if ($error){
for ($i=0;$i<sizeof($error);$i++){
echo $error[$i];}
}else{
$host="localhost";
$user="prueba";
$data="pruebas";
$pass="****";
include ("conexiones/conex1.php");
$link=Conectarse($host,$user,$pass,$data);
$sql = "select * from usuarios_pro1";
$result = mysql_query($sql,$link) or die("Error de la consulta $sql .<br>MySQL dice : ".mysql_error());
$row = mysql_fetch_array($result);
if ($row["nick"]==$nick AND $row["pass"]==$passo){
echo "<p align='center'><font color='#FFCC00'><strong>abriendo.....</strong></font></p>";
?>
<SCRIPT LANGUAGE="JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=200,height=20,left = 540,top = 484.5');");
}
javascript:popUp("correct.php");
</script>
<?
}else{
echo "<p align='center'><font color='#FFCC00'><strong>Pruebe de nuevo</strong></font></p>";
}
mysql_free_result($result);
mysql_close($link);
break;
}}
?>
Código PHP:
<link href="estilos.css" rel="stylesheet" type="text/css">
<form<? echo " method='get' action='$PHP_SELF?acc=mirar' class='formu' "; ?>>
pueblo:<input type="text" name="pueblo" class="boton2">
<input type="submit" class="boton" value="Rastrear"></form>
y yo lo quiero asi
http://localhost/..../.../..../.../p...****&acc=mirar
como puedo conseguirlo eso me solucionaria el problema