I have this form to submit old and new password, used for changing the password of a pop3 mail user.
<form method="POST" action="changepass.php">
<p><input name="username" size="20">User Name</p>
<p><input type="password" name="curpass" size="20">Old Password</p>
<p><input type="password" name="newpass" size="20">New Password</p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
The changepass.php file is
<?
use Net::Telnet;
$telnet = new Net::Telnet ( Timeout=>10,
Errmode=>'die');
$telnet->open('pop3.druknet.net.bt');
$telnet->waitfor('/login: $/i');
$telnet->print($username);
$telnet->waitfor('/password: $/i');
$telnet->print($curpass);
$telnet->waitfor('/\$ $/i');
$telnet->print('who');
$output = $telnet->waitfor('/\$ $/i');
print $output;
?>
But this gives and error like this
Parse error: parse error, expecting T_CONSTANT_ENCAPSED_STRING' or'('' in C:\Program Files\Apache Group\Apache\htdocs\pop3pwd\changepass.php on line 2
Can anyone help me solve this problem,
and i feel this can help pop3 users to change their email password through a web based browser.
ANy comments.
Thanks a lot.
Karma.