PDA

View Full Version : errors


upclose
04-27-2007, 06:22 AM
im having a problem updating a field, i have my own member system and i want it to update a password for a member

here is the error:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/gandw/public_html/Members/Beta/update_pass.php on line 10

and the coding to connect and change the password is

$_db->connect();
$db = mysql_query("UPDATE password SET password = '".sha1($_POST['password'])."' WHERE username = '$username'");


anyone know the problem?

everythingdaniel
04-27-2007, 06:30 AM
whats the code for "update_pass.php"? It looks like their is some whitespace under the "?>".

ok...
<?php
code
?>
<html>

not ok...
<?php
code
?>



<html>

Stryker250
04-27-2007, 08:32 AM
$_db->connect();
$password = $_POST['password']l
$db = mysql_query("UPDATE password SET password = SHA1('$password') WHERE username = '$username'");