Jump to content

[SOLVED] Note Book Feature Problem (Won't Show)


FuZzI

Recommended Posts

Hello,

 

I'm new here and a bit new to php also ..

 

Here is the problem.

 

I have a web based game and I wanted to add a note book section. When I write in the note book, it saves the note into the database but it doesn't show up when you view the note book, which I find is weird.

 

Here is the script for the note book page:

 

<?PHP
include "header2.php";
include "_menu.php";

if (($_POST['change_notes']) && ($_POST['notes'])){
$notes=strip_tags($_POST['notes']);

mysql_query("UPDATE users SET notes='$notes' WHERE username='$username'");
echo "Your notes has been updated"; 
}
?>
<html>
<body>
<center>
  <br>
  <table width="713" border="1" class="thinline" rules="none" cellpadding="0" cellspacing="0" bordercolor="" bgcolor="">
    <tr>
      <td width="709" height="21" class="header">
        <div align="center">Note Pad </div></td>
    </tr>
    <tr>
      <td ><table width="100%" height="383"  border="0" cellpadding="2" cellspacing="2">
        <tr>
          <td><form action="" method="POST">
         
              <br>
              <center><textarea name="notes" cols="100" rows="15" id="notes"><?php echo "$fetch->notes"; ?></textarea></center>
              <br>

              <br>
              <center><input name="change_notes" type="submit" id="change_notes" value="submit">
              </center><br>        
          </form></td>
        </tr>
      </table></td>
    </tr>
  </table>
  <br>
  <p> </p>
</center><p>
<?php include_once"footer.php"; ?>
</body>
</html>

 

Any help would really be appreciated, been stuck with this for over months!

 

Thank you,

FuZzI

Link to comment
Share on other sites

I finally understood what you meant! Thanks alot for helping out, I've finally figured out why it wasn't working.

 

This was the problem ..

 

I was missing the object thing ..

 

$notes = $row[notes];

 

Which I added into my header that I included into the notes.php file.

 

Thanks alot!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.