El codigo de la página seria el siguiente:
Código php:
Ver original<!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>
<link rel="shortcut icon" href="../../favicon.ico" >
<link rel="icon" type="image/gif" href="../../animated_favicon1.gif" >
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>HNM - Login to continue</title>
<style type="text/css">
<!--
#apDiv1 {
position:absolute;
width:175px;
height:164px;
z-index:1;
left: 1px;
top: 1px;
}
.Estilo21 {font-family: Castellar;
color: #aaaaaa;
font-size: 36px;
}
.Estilo24 {font-size: 40px}
#apDiv4 {
position:absolute;
width:710px;
height:128px;
z-index:3;
top: 1px;
left: 166px;
}
#apDiv5 {
position:absolute;
width:290px;
height:138px;
z-index:4;
left: 970px;
top: 1px;
}
#apDiv2 {
position:absolute;
width:175px;
height:460px;
z-index:2;
left: 1px;
top: 153px;
}
body {
background-color: #AA6B2A;
}
#apDiv10 {
position:absolute;
width:700px;
height:260px;
z-index:6;
left: 276px;
top: 160px;
}
a:link {
text-decoration: none;
color: #aaaaaa;
}
a:visited {
text-decoration: none;
color: #aaaaaa;
}
a:hover {
text-decoration: none;
color: #aaaaaa;
}
a:active {
text-decoration: none;
color: #aaaaaa;
}
#apDiv3 {
position:absolute;
width:200px;
height:121px;
z-index:7;
left: 524px;
top: 439px;
}
#apDiv6 {
position:absolute;
width:751px;
height:17px;
z-index:8;
left: 255px;
top: 581px;
}
.Estilo35 {font-size: 16px}
#apDiv7 {
position:absolute;
width:153px;
height:115px;
z-index:9;
left: 257px;
top: 292px;
}
#apDiv8 { position:absolute;
width:297px;
height:61px;
z-index:6;
left: 403px;
top: 399px;
}
#apDiv9 {
position:absolute;
width:150px;
height:43px;
z-index:10;
left: 328px;
top: 480px;
}
.Estilo36 {font-family: Castellar}
.Estilo39 {
font-family: Castellar;
font-size: 16px;
color: #aaaaaa;
}
.Estilo40 {font-family: Castellar; font-size: 16px; }
#apDiv11 {
position:absolute;
width:1083px;
height:476px;
z-index:5;
left: 176px;
top: 180px;
}
#apDiv12 {
position:absolute;
width:220px;
height:32px;
z-index:6;
left: 181px;
top: 146px;
}
.style1 {
margin-left: 200px;
}
.style2 {
font-size: medium;
}
-->
</style>
</head>
<body>
<?php
$username = $_COOKIE['loggedin'];
if (!isset($_COOKIE['loggedin'])) die(a href
="../home.html"); [B
]// Aqui me da un problema de syntax error, unexpected T_STRING //[/B]
?>
<div id="apDiv1">
<table width="175" height="160" border="0">
<tr>
<th width="175" height="148" bgcolor="#663300" scope="col"><div align="center"></div></th>
</tr>
</table>
</div>
<div id="apDiv5">
<table width="290" height="129" border="0">
<tr>
<th width="280" height="135" bgcolor="#663300" scope="col"> <form action="../../registration/login.php" method="post">
<table width="220" border="0">
<tr>
<th width="86" scope="col"><div align="right" class="Estilo35">Username:</div></th>
<th width="124" scope="col"><div align="left">
<input type="text" name="username" size="20" maxlength="20" />
</div></th>
</tr>
<tr>
<th scope="row"><div align="right" class="Estilo35">Password:</div></th>
<td><div align="left">
<input type="password" name="password" size="20" maxlength="20" />
</div></td>
</tr>
<tr>
<th colspan="2" scope="row"><input type="submit" value="Login" /></th>
</tr>
</table>
</form></th>
</tr>
</table>
</div>
<div id="apDiv2">
<table width="175" height="463" border="0">
<tr>
<th height="50" valign="bottom" bgcolor="#663300" scope="col"><span class="Estilo39"><a href="http://www.forosdelweb.com/home.html">Home</a></span></th>
</tr>
<tr>
<th width="200" height="15" valign="bottom" bgcolor="#663300" scope="row"><span class="Estilo39"><a href="http://www.forosdelweb.com/registration/login.html">Members</a></span></th>
</tr>
<tr>
<th height="15" valign="bottom" bgcolor="#663300" scope="row"><span class="Estilo39">Search</span></th>
</tr>
<tr>
<th height="15" valign="bottom" bgcolor="#663300" scope="row"><a href="http://www.forosdelweb.com/global map.html" class="Estilo40">Sites</a></th>
</tr>
<tr>
<th height="15" valign="bottom" bgcolor="#663300" scope="row"><a href="http://www.forosdelweb.com/registration/logout.php" class="Estilo36"></a></th>
</tr>
<tr>
<th height="15" bgcolor="#663300" scope="row"> </th>
</tr>
<tr>
<th height="15" bgcolor="#663300" scope="row"> </th>
</tr>
<tr>
<th height="15" valign="bottom" bgcolor="#663300" scope="row"><a href="http://www.forosdelweb.com/registration/logout.php" class="Estilo40">Logout</a></th>
</tr>
<tr>
<th height="15" bgcolor="#663300" scope="row"> </th>
</tr>
<tr>
<th bgcolor="#663300" scope="row"> </th>
</tr>
</table>
</div>
<div id="apDiv4" style="left: 166px; top: 1px">
<table width="810" height="128" border="0">
<tr>
<th width="710" height="135" bgcolor="#663300" scope="col"><div align="left">
<blockquote>
<blockquote>
<p> </p>
</blockquote>
</blockquote>
</div></th>
</tr>
</table>
</div>
<form action="update.php" method="post" class="style1" >
<p>
</p>
<p> </p>
<p> </p>
<p> </p>
<p><strong><span class="style2">Welcome</span></strong>
<input type="text" name="username" disabled="disabled" value="<?php
include "../config.php";
echo "$qry[username]";
}
?>" />
</p>
<p style="width: 1048px; height: 120px">
" alt="Avatar" />
<strong><span class="style2">Personal Details</span></strong><br />
First Name:
<input type="text" name="name1" value="<?php
include "../config.php";
echo "$qry[name1]";
}
?>" />
<br />
Second Name:
<input type="text" name="name2" value="<?php
include "../config.php";
echo "$qry[name2]";
}
?>" />
<br />
; Email Address:
<input type="text" name="email" value="<?php
include "../config.php";
echo "$qry[email]";
}
?>" />
<br />
Your website (URL):
<input type="text" name="website" value="<?php
include "../config.php";
echo "$qry[website]";
}
?>" />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</p>
<p>Your Avatar (URL):
<br />
Avatar size is 150px x 150px, resizing will occur if the image is larger than the 150px x 150px size..</p>
<p><strong>Change your password</strong></p>
<p> Old Password:
<input type="password" name="oldpass" />
<br />
New Password:
<input type="password" name="newpass" />
<br />
</p>
<p>
<input type="submit" name="Submit" value="Submit" />
</p>
</form>
</body>
</html>
Ahora saliendome el error marcado a la hora de direccionar a una pagina dependiendo de las cookies, no se si este "formato" llegaría a ser válido.
Si fuera posible, rogaría algún consejo que me explicara como poder mantener el diseño de la pagina, con la funcionalidad de un perfil grafico de usuario que devolviera estos y mas datos registrados en la base de datos.
Y si fuera posible, algún consejo sobre como quitar los cuadros de texto que recogen las respuestas de la bd, apareciendo simplemente como texto contiguo.
Muchas gracias de antemano.