I don't know whats up with this HTML code, it has PHP in it and it's main purpose is to post a message to twitter, except it doesn't post anything and displays a random string of symbols.
Heres the code:

<html>
<head>
<?php
function posttotwitter(){
$message = $_POST['msg'];
$twitter_user = $_POST['username'];
$twitter_password = $_POST['pwd'];
$twitter_api_url = “http://twitter.com/statuses/update.xml?status=”.urlencode(stripslashes(urldeco de($message)));
$twitter_data = $message;
$ch = curl_init($twitter_api_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $twitter_data);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERPWD, “{$twitter_user}:{$twitter_password}”);
$twitter_data = curl_exec($ch);
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo ‘Posting Message: ‘.$message.’<br> to <br> http://www.twitter.com/’.$twitname.”;
if ($httpcode != 200) {
echo “<strong>Don’t Panic!</strong> Something went wrong, and the tweet wasn’t posted. ”;
}
}
?>
</head>
<body>
<INPUT TYPE = "Text" VALUE ="Twitter Username" NAME = "username">
<INPUT TYPE = "Text" VALUE ="Password" NAME = "pwd">
<INPUT TYPE = "Text" VALUE ="Message" NAME = "msg">
<INPUT TYPE = "Button" VALUE ="Update" NAME = "post" OnClick= <?php posttotwitter() ?>>
</body>
</html>

Please help
Thanks