Jump to content

Profile Database Problem


Recommended Posts

I have the "Jpmaster77's login script" on my site and I wanted to add "Biography's" on the profiles.

I created a new row in the 'users' table called 'bio' so I added this code to the 'userinfo.php' file:

/* Bio*/
echo "<b><u>Biography:</b></u> <br/> ".$req_user_info['bio']."</p></div>";

 

I copied it from the E-mail one, which is:

/* Email */
echo "<b><u>E-mail:</b></u> <br/> ".$req_user_info['email']."</p><hr/>";

(I just changed the 'email' to 'bio' )

 

And here is the 'useredit.php' (edit profile) file for the editing bio:

 

<div class="clear"></div>
 <p class="grid_2"><div align="center">Biography: </p>
 <p class="center">
  <input class="center" type="textarea" name="bio" maxlength="10000" value="<?php
  if($form->value("bio") == ""){
echo $session->userinfo['bio'];
  }else{
echo $form->value("bio");
  }
  ?>">
  <?php echo $form->error("bio"); ?>
 </p>
 <div class="clear"></div>
 <p>

 

And I also just copied that from the "E-mail" edit profie, which is:

 

<div class="clear"></div>
 <p class="grid_2"><div align="center">E-mail: </p>
 <p class="center">
  <input class="center" type="text" name="email" maxlength="50" value="<?php
  if($form->value("email") == ""){
   echo $session->userinfo['email'];
  }else{
   echo $form->value("email");
  }
  ?>">
  <?php echo $form->error("email"); ?>
 </p>
 <div class="clear"></div>
 <p>
<br/>

 

 

But my problem is when the user edits his profile nothing get submitted to the database and nothing obviously shows up on their profile.

What am I doing wrong?

 

What I said above is ALL did.

 

Any nice help is really appreciated.

 

[i also attached a picture of the 'bio' database row.]

post-48575-0-90810100-1382483742_thumb.png

  • Like 1
Link to comment
Share on other sites

If you manually add information through phpMyAdmin to the bio column, does that info display on userinfo.php and/or the textarea on useredit.php?

 

Also, consider using this for your textarea code:

<textarea class="center" name="bio" maxlength="10000">
<?php
  if($form->value("bio") == ""){
       echo $session->userinfo['bio'];
  }else{
       echo $form->value("bio");
  }
?>
</textarea>

Link to comment
Share on other sites

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.   Paste as plain text instead

  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...