if (strcmp($_POST['password'], $_POST['password_check']) == 0) { updatePassword($_POST['password'], $uid); } else { echo "<script language=\"javascript\" type=\"text/javascript\">"; echo "alert('The Passwords not matching! Try again.Thank you')"; echo "</script>"; } } else { echo "<script language=\"javascript\" type=\"text/javascript\">"; echo "alert('Password should have minimum length of 6')"; echo "</script>"; } } if (isset($_POST['updateAbout'])) { if (!empty($_POST['about'])) { updateAbout($_POST['about'], $uid); } else { echo "<script language=\"javascript\" type=\"text/javascript\">"; echo "alert('About field should not be empty')"; echo "</script>"; } } if (isset($_POST['upload'])) { if (isset($_FILES['media'])) { upload_profilepic($_FILES['media'], $uid); } else { echo "<script language=\"javascript\" type=\"text/javascript\">"; echo "alert('Please choose an image')"; echo "</script>"; } }
<p id="apara"><?php echo nl2br($userdata["about"]); ?> </p> <form id="aboutform" method="post" action="admin.php#about" style="display:none;"> <p style="color:seashell;background:#000;border-bottom:2px solid orangered;padding:10px;font-size:20px;"> Edit text below to change information about you !</p><br/> <textarea name="aboutcontent"><?php echo $userdata["about"]; ?> </textarea><br/> <input class="mybutton" type="submit" name="editabout" value="edit"/> </form> <?php if (isset($_POST['editabout'])) { $about = mysqlPrep($_POST['aboutcontent']); updateAbout($userdata["username"], $about); } ?> </div> </div> <!-- /About --> <!-- Contact --> <div id="contact" class="panel"> <div class="content"> <h2>Contact</h2> <?php echo "<p style=\"color:seashell;background:#000;border-bottom:2px solid orangered;padding:10px;font-size:20px;\"> your email : " . $userdata["email"] . "</p>"; ?> <br/> <?php