05-07-2009, 11:19 PM
|
#8 (permalink)
|
|
The Gregarious
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
|
Quote:
Originally Posted by Randy
1. Worked Fine
2. First Had Errors Cause of MD5 Hashed Passwords
3. Rewrote without verifying the password as that seems to be what was causing it.
So it worked.
Final Code:
PHP Code:
<?php
if (isset($_POST['submit'])) {
// Define Variables
$notes = $_POST['notes'];
// Attempt To Update
$update = mysql_query("UPDATE user SET `notes` = '".$notes."' WHERE `username` = '$username'") or die(mysql_error());
if($update) {
echo $notes;
}
} else {
?>
<form id="form1" name="form1" method="post" action="">
My Personal Notes<br />
<label class="textarea">
<textarea name="notes" id="notes" rows="6" cols="80"><?php echo $notes ?></textarea>
</label>
<p><small>Any notes that you put in this box are your private notes, Nobody else will be able to see them, so make them as secret as you want.</small></p>
<p>
<input name="submit" id="submit" type="submit" />
</p>
</form>
<?php } ?>
as for your first comment allworknoplay, im not sure what you mean by cleaning it up, seems alright to me.
|
Glad to hear it worked...
I just have my own personal preference when it comes to queries. So it looks like yours was fine..but I like to use AND instead of && etc....stuff like that....no biggie...
|
|
|
|