All pastes #450923 Raw Edit

jonano

public text v1 · immutable
·published 2007-04-21 04:06 UTC
rendered paste body
<?php session_start(); ?>

<?php

if(isset($_SESSION['user'])) { ?>

<form action"editabout.php" method="post" name="about" id="about">Update your profile:<p>
<textarea cols="100" name="about" rows="20" wrap="on"></textarea><p>
<input style="font-size: 20px; height: 50px; width: 200px" name="btnLogin" type="submit" id="btnLogin" value="Update">
</form><p><a href="index.php">Back</a>

<?php }?>

<?php

if(!isset($_SESSION['user'])) {

include "loginupdate.php";
  echo "<center>You need to log in or <a href=\"signup.php\">register</a> to access our site. You are currently not.</center>";
exit;
}

include ("mysql.php");

$about = mysql_escape_string($_POST['about']);

$sql = "UPDATE tbl_auth_user SET about = '".$about."' WHERE '$user' = 1"

or die(mysql_error());

mysql_query($sql)

?>