File size: 1.09Kb
<?php include "head.php"; $_POST["aurl"] = str_replace($filter,"*",$_POST["aurl"]); $_POST["email"] = str_replace($filter,"*",$_POST["email"]); $_POST["ame"] = str_replace($filter,"*",$_POST["ame"]);
$action=$_GET["action"]; if($action==""){echo '<form action="eprof.php?action=edit" method="post"><center>Avatar Url<br/><input name="aurl" type="text" value="http://"/><br/>Email<br/><input name="email" type="text"/><br/>
About me<br/><textarea name="ame"></textarea><br/><input type="submit" value="Update!"/></center></form>'; }
if($action=="edit"){
$f=fopen("prof/".$_SESSION["userName"].".php","w+"); fwrite($f,'<center><b>My avatar</b><br/><img src="'.$_POST["aurl"].'"/><br/><b>My Email</b><br/><a href="mailto:'.$_POST["email"].'">'.$_POST["email"].'</a><br/>
<b>About Me</b><br/>'.$_POST["ame"].'<br/><a href="private.php?action=send&reply&name='.$_SESSION["userName"].'">Send Message</a><br/>--------------
</center>'); fclose($f); echo '<center><b>Your profile was updated!</b></center>';} echo '<center><a href="prof.php?user='.$_SESSION["userName"].'">View My Profile</a></center>'; include "foot.php"; ?>