Quote Originally Posted by Jordan, View Post
I keep getting
Parse error: syntax error, unexpected T_VARIABLE in /home/public_html/Ichthus/edituser2.php on line 38

36-42
PHP Code:
<? 
($_POST['Save'])
$username htmlspecialchars($_POST[username]);
$nick htmlspecialchars($_POST[nickname]);
$email htmlspecialchars($_POST[email]);
$money htmlspecialchars($_POST[char_money]);
$sql = @mysql_query("USERNAME user SET username = '$username', nickname = '$nick', email = '$email', char_money = '$money' WHERE user = '$user'");
Any ideas

I didn't check, but I don't understand what your trying to get with but before I even strip anything down I check if value == null. Then I will put the var into a string for easier transfer between different areas of the script (eg: <? $name = $_POST["name"]; ?> )

Usually when im using $_POST in a function I will tag the arguemetn
$username = htmlspecialchars($_POST["username"]); apposed to
$username = htmlspecialchars($_POST[username]);

Id do this personally
$username = $_POST["username"];
$username = function($username);

Also you haven't defined ($_POST['Save']) - Its just placed there out of no where, I'd remove that to start with.

<?
$username = htmlspecialchars($username);
echo($username);
?>