Code: Select all
<form action="profile.php?{$id}" method="post" name="FormName">
<table width="364" border="0" cellspacing="0" cellpadding="0" cool gridx="2" gridy="2" height="154" usegridx usegridy>
<tr height="4">
<td width="4" height="153" rowspan="3"></td>
<td width="359" height="4" colspan="2"></td>
<td width="1" height="4"><spacer type="block" width="1" height="4"></td>
</tr>
<tr height="78">
<td width="359" height="78" colspan="2" valign="top" align="left" xpos="4"><textarea style="BORDER-RIGHT: #E8E8E8 1px solid; BORDER-TOP: #E8E8E8 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #E8E8E8 1px solid; BORDER-BOTTOM: #E8E8E8 1px solid; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #E8E8E8" name="shout" rows="4" cols="55"></textarea></td>
<td width="1" height="78"><spacer type="block" width="1" height="78"></td>
</tr>
<tr height="71">
<td width="62" height="71"></td>
<td width="297" height="71" valign="top" align="left" xpos="66"><input type=image name="submit" value="newshout" src="images/button_overlay.gif" alt="" width="100" height="14" border="0"></td>
<td width="1" height="71"><spacer type="block" width="1" height="71"></td>
</tr>
<tr height="1" cntrlrow>
<td width="4" height="1"><spacer type="block" width="4" height="1"></td>
<td width="62" height="1"><spacer type="block" width="62" height="1"></td>
<td width="297" height="1"><spacer type="block" width="297" height="1"></td>
<td width="1" height="1"></td>
</tr>
</table>
</form>Code: Select all
if ($_POST['submit']=="newshout"){
//if a user is logged, he "shouts" as himself
if (isset($_SESSION['id'])){
$user_profile->sb_add_shout($id, $current_user->username, $_POST['shout']);
}
//if a user is not logged in, he "shouts" as annonymous
else {
$user_profile->sb_add_shout($id, "Annonymous", $_POST['shout']);
}
}Thanks.