Código PHP:
width="105" height="119" /></p>
<p align="center">Pero eso solo lo decidirá el sombrero... a proposito..</p>
<p align="center">¿Quieres empezar de una vez con las preguntas?<br />
(Hechas por <a href="mailto: [email protected]">daiuh</a>)</p>
<form action="<?php echo $editFormAction; ?>" method="POST" name="form1" target="som" id="form1">
<p align="center"><strong>1) Si tuvieras qe escoger una profesión en el mundo de los muggles ¿Por cuál optarias?</strong><br />
a) Juez o maestro
<label>
<input type="radio" name="uno" id="radio" value="h" />
</label>
<br />
b) Médico o cientifico
<input type="radio" name="uno" id="radio2" value="r" />
<br />
c) Político
<input type="radio" name="uno" id="radio3" value="s" />
<br />
d) Bombero
<input type="radio" name="uno" id="radio4" value="g" />
<br />
<strong>2) ¿Cuáles son tus vacaciones ideales?</strong><br />
a) Roma
<input type="radio" name="dos" id="radio5" value="r" />
<br />
b) París, Londres, Nueva York
<input type="radio" name="dos" id="radio6" value="s" />
<br />
c) Asia
<input type="radio" name="dos" id="radio7" value="h" />
<br />
d) Cualquier país exótico
<input type="radio" name="dos" id="radio8" value="g" />
<br />
<strong>3) ¿Cuál es tu pelicula favorita?</strong><br />
a) Las de Indiana Jones
<input type="radio" name="tres" id="radio9" value="g" />
<br />
b) Buscando a Nemo
<input type="radio" name="tres" id="radio10" value="h" />
<br />
c) Ocean's Eleven
<input type="radio" name="tres" id="radio11" value="s" />
<br />
d) Grease
<input type="radio" name="tres" id="radio12" value="r" />
<br />
<strong>4) ¿Cuál es el objeto de tus sueños?</strong><br />
a) El mapa del merodeador
<input type="radio" name="cuatro" id="radio13" value="s" />
<br />
b) La recordadora
<input type="radio" name="cuatro" id="radio14" value="h" />
<br />
c) Un escreguto
<input type="radio" name="cuatro" id="radio15" value="r" />
<br />
d) Una Nimbus 2000
<input type="radio" name="cuatro" id="radio16" value="g" />
<br />
<strong>5) ¿Cuál es tu materia favorita?</strong><br />
a) DCAO
<input type="radio" name="cinco" id="radio17" value="g" />
<br />
b) Pociones
<input type="radio" name="cinco" id="radio18" value="s" />
<br />
c) CCM
<input type="radio" name="cinco" id="radio19" value="h" />
<br />
d) Encantamientos e HM
<input type="radio" name="cinco" id="radio20" value="r" />
<br />
<strong>6) ¿A que le dedicas tu tiempo libre?</strong><br />
a) A gastar bromas
<input type="radio" name="seis" id="radio21" value="s" />
<br />
b) Leer un buen libro
<input type="radio" name="seis" id="radio22" value="r" />
<br />
c) Juegas ajedrez con un amigo
<input type="radio" name="seis" id="radio23" value="h" />
<br />
d) Fútbol
<input type="radio" name="seis" id="radio24" value="g" />
<br />
<strong>7) ¿Que epoca de la historia te gustaria visitar?</strong><br />
a) La antigüedad
<input type="radio" name="siete" id="radio25" value="g" />
<br />
b) La edad media
<input type="radio" name="siete" id="radio26" value="s" />
<br />
c) La epoca de miguel angel
<input type="radio" name="siete" id="radio27" value="r" />
<br />
d) La nuestra
<input type="radio" name="siete" id="radio28" value="h" />
</p>
<p align="center">
<label>
<input type="submit" name="button" id="button" value="enviar" />
</label>
<br />
</p>
<p align="center"> </p>
<p align="center"></p>
<input type="hidden" name="MM_update" value="form1" />
</form>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"><iframe width="500
" height="200" name="som"></iframe> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p></td>
</tr>
</table></td>
<td width="100"> </td>
<td> </td>
</tr>
<tr>
<td width="156"> </td>
<td width="244"> </td>
<td width="260"> </td>
<td width="100"> </td>
<td width="100%"> </td>
</tr>
</table>
<br />
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
sombrero2.php
Código PHP:
<?php
#conexion
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$colname_casa = "-1";
if (isset($_SESSION['MM_Username'])) {
$colname_casa = $_SESSION['MM_Username'];
}
mysql_select_db($database_general, $general);
$query_casa = sprintf("SELECT * FROM usuarios WHERE usuario = %s", GetSQLValueString($colname_casa, "text"));
$casa = mysql_query($query_casa, $general) or die(mysql_error());
$row_casa = mysql_fetch_assoc($casa);
$totalRows_casa = mysql_num_rows($casa);
?>
<!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=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
background-color: #3366FF;
}
.style1 {
font-family: Geneva, Arial, Helvetica, sans-serif;
color: #FFFFFF;
}
.style2 {
font-family: Georgia, "Times New Roman", Times, serif;
font-weight: bold;
font-size: 12px;
color: #FFFFFF;
}
-->
</style></head>
<body>
<div align="center"><span class="style1">Usted fue seleccionado</span></div>
<p align="center" class="style2"> </p>
<p align="center" class="style2">Su casa:</p>
<p align="center" class="style2"></p>
<p align="center" class="style2"><?php echo $row_casa['casa']; ?></p>
<p align="center" class="style2"> </p>
</body>
</html>
<?php
mysql_free_result($casa);
?>
El asunto es que no me imprime el ultimo echo!
(Pd.: Sobre el primer formulario, lo añade a la base correctamente)
(Pd2.: MM_Username, si, esta bien eso.)