Drag00n Posted November 1, 2012 Share Posted November 1, 2012 This error keeps coming Parse error: syntax error, unexpected ';' in /home/a3504700/public_html/changeavatar.php on line 11 <?php include("leftnavigation.php"); $user = $info['username']; $userid = $info['id']; $password2 = $info['password']; ?> <center><?php if(isset($_POST['update'])) { $enteredpass = md5($_POST['password']; if($password2==$enteredpass) { $avatar = $_POST['avatar']; $update = mysql_query("UPDATE users SET avatar = '$avatar' WHERE id = $userid"); echo "Your avatar was updated succesfully"; } else { echo "Enter correct password"; } } else { echo "Here you can change the avatar. Enter.current password for verification."; } ?> <form method=post> Choose your avatar <br><?php echo '<img id=avatarchange src=images/trainers/000.png />'; ?> <?php echo '<select name=avatar id= Avatar onchange=changeAvi()>'; $sql6=mysql_query("SELECT * FROM avatars"); while ($row6=mysql_fetch_array($sql6)){ echo "<option value='".$row6['Image']."'>".$row6['Name']."</option>"; } echo '</select>'; ?> <script type="text/javascript"> function changeAvi(){ var image = document.getElementById('avatarchange'); var dropd = document.getElementById('Avatar'); image.src = dropd.value; }; </script> Enter Current Password :<br /><input type="password" name="password" maxlength="40"> <input type=submit name=update > </form> <script type="text/javascript"> function changeAvi(){ var image = document.getElementById('avatarchange'); var dropd = document.getElementById('Avatar'); image.src = dropd.value; }; </script> <?php include("rightnavigation.php"); ?> Link to comment https://forums.phpfreaks.com/topic/270157-help/ Share on other sites More sharing options...
ManiacDan Posted November 1, 2012 Share Posted November 1, 2012 How to debug this code: 1) Find line 11 2) What's wrong with it? hint: $enteredpass = md5( $_POST[ 'password' ] ; Link to comment https://forums.phpfreaks.com/topic/270157-help/#findComment-1389280 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.