Ajuda a passar post para php

Sasukez0r

Power Member
É assim eu tenho tudo feito mas o que acontece e que eu quero que os utilizadores possam alterar a sua descriçao tou a usar uma textarea mas não funciona =S....

Código:
<div id="titulo"><img src="/layout/dart.gif"> Profile</div>
<div id="separador"></div>
<p>
<?
if($_POST['realname']){
$real_name = $_POST['realname'];
ownsql("UPDATE ninja SET real_name='$real_name' WHERE id='$ninja'");
header("LOCATION: home.php?inc=profile");
}
if($_POST['age']){
$age = $_POST['age'];
ownsql("UPDATE ninja SET age='$age' WHERE id='$ninja'");
header("LOCATION: home.php?inc=profile");
}
if($_POST['description']){
$desc = $_POST['description'];
ownsql("UPDATE ninja SET desc='$desc' WHERE id='$ninja'");
header("LOCATION: home.php?inc=profile");
}
?>
<form action="home.php?inc=profile" method="POST">
<table width="400" id="texto"><tr><td>
<table align="left" id="texto">
<tr>
<td><b>Name:</b></td><td align="right"><input style="border: 1px solid #385483; background-color: #E2EBE8;" type="text" value="<? echo $row[4]; ?> <? echo $row[3]; ?>" readonly=""></td>
</tr><tr>
<td><b>Village:</b></td><td align="right"><input style="border: 1px solid #385483;  background-color: #E2EBE8;" type="text" value="<? echo $village; ?>" readonly=""></td>
</tr><tr>
<td><b>Real Name:</b></td><td align="right"><input style="border: 1px solid #385483;" type="text" name="realname" value="<? echo $row[46]; ?>"></td>
</tr><tr>
<td><b>Age:</b></td><td align="right"><input style="border: 1px solid #385483;" type="text" name="age" value="<? echo $row[47]; ?>"></td>
</tr>
</table>
<table align="right"><tr><td>
<img src="/imagens/gif/profile.gif">
</td></tr></table>
</td></tr></table>
<p>
<table width="400" id="texto"><tr><td>
<table id="texto" align="left">
<tr>
<td><b>Shinobi Description:</b></td>
</tr><tr>
<td><textarea name="description" cols="40" rows="8"><? echo $row[48]; ?></textarea><div id="desc">Use [BBCODE]</div></td>
</tr><tr>
<td align="center"><input type="submit" value="Edit"></td>
</tr>
</table>
</form>
</td></tr></table>
 
É assim eu tenho tudo feito mas o que acontece e que eu quero que os utilizadores possam alterar a sua descriçao tou a usar uma textarea mas não funciona =S....

Código:
<div id="titulo"><img src="/layout/dart.gif"> Profile</div>
<div id="separador"></div>
<p>
<?
if($_POST['realname']){
$real_name = $_POST['realname'];
ownsql("UPDATE ninja SET real_name='$real_name' WHERE id='$ninja'");
header("LOCATION: home.php?inc=profile");
}
if($_POST['age']){
$age = $_POST['age'];
ownsql("UPDATE ninja SET age='$age' WHERE id='$ninja'");
header("LOCATION: home.php?inc=profile");
}
if($_POST['description']){
$desc = $_POST['description'];
ownsql("UPDATE ninja SET desc='$desc' WHERE id='$ninja'");
header("LOCATION: home.php?inc=profile");
}
?>
<form action="home.php?inc=profile" method="POST">
<table width="400" id="texto"><tr><td>
<table align="left" id="texto">
<tr>
<td><b>Name:</b></td><td align="right"><input style="border: 1px solid #385483; background-color: #E2EBE8;" type="text" value="<? echo $row[4]; ?> <? echo $row[3]; ?>" readonly=""></td>
</tr><tr>
<td><b>Village:</b></td><td align="right"><input style="border: 1px solid #385483;  background-color: #E2EBE8;" type="text" value="<? echo $village; ?>" readonly=""></td>
</tr><tr>
<td><b>Real Name:</b></td><td align="right"><input style="border: 1px solid #385483;" type="text" name="realname" value="<? echo $row[46]; ?>"></td>
</tr><tr>
<td><b>Age:</b></td><td align="right"><input style="border: 1px solid #385483;" type="text" name="age" value="<? echo $row[47]; ?>"></td>
</tr>
</table>
<table align="right"><tr><td>
<img src="/imagens/gif/profile.gif">
</td></tr></table>
</td></tr></table>
<p>
<table width="400" id="texto"><tr><td>
<table id="texto" align="left">
<tr>
<td><b>Shinobi Description:</b></td>
</tr><tr>
<td><textarea name="description" cols="40" rows="8"><? echo $row[48]; ?></textarea><div id="desc">Use [BBCODE]</div></td>
</tr><tr>
<td align="center"><input type="submit" value="Edit"></td>
</tr>
</table>
</form>
</td></tr></table>



não consegues ser (muito mais) explicito??
 
Back
Topo