All pastes #451623 Raw Edit

jonano

public php v1 · immutable
·published 2007-04-21 18:25 UTC
rendered paste body
<?php session_start(); ?><?phpinclude ("mysql.php");$about = mysql_escape_string($_POST['about']);$sql = "UPDATE tbl_auth_user SET about = '".$about."' WHERE user_id = '".$user."'";mysql_query($sql)or die(mysql_error());$sqluser = "SELECT about FROM tbl_auth_user WHERE user_id = '$user'";$result = mysql_query($sqluser);if(isset($_SESSION['user'])) { ?>Current profile: <p><?php while ($line = mysql_fetch_assoc($result)) {echo $line["about"];} ?><p><form 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" onclick="document.location = 'index.php'" type="submit" id="btnLogin" value="Update"><p><a href="index.php">Back</a></form><?php } ?><?phpif(!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;}?>