On Jan 2, 2008 10:00 AM, Adam Williams <awilliam@xxxxxxxxxxxxxxxx> wrote: > I'm running PHP 5.2.4 and getting the error: > > *Warning*: Wrong parameter count for imap_open() in > */var/www/sites/intra-test/contract/login.php* on line *9 > > *My code is: > > $mbox = > imap_open("\"{mail.mdah.state.ms.us/imap/novalidate-cert:143}INBOX\", > \"".$_POST["username"]."\", \"".$_POST["password"]."\""); // line 9 [snip!] You just forgot to encapsulate your parameters properly. You escape the strings, but don't close the parameter, so PHP reads that all as one parameter passed to imap_open(). Change it to one of the following: $mbox = imap_open("\"{mail.mdah.state.ms.us/imap/novalidate-cert:143}INBOX\"","\"".$_POST["username"]."\"","\"".$_POST["password"]."\""); // line 9 ---- OR ---- $mbox = imap_open('"{mail.mdah.state.ms.us/imap/novalidate-cert:143}INBOX"','"'.$_POST['username'].'"','".$_POST['password'].'"'); -- Daniel P. Brown [Phone Numbers Go Here!] [They're Hidden From View!] If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php