Jump to content

Help


Drag00n

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

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