Page 1 of 1

Email creator

Posted: Mon Apr 18, 2011 8:32 pm
by Alidad
hi, I wrote code that allow me to create email account outside of cpanel and works greats with one domain name.
However I'm trying to change code for two domains to select domain name using menu.

The forms that i wrote is come with one text fields for input user name and one drop menu for select domain which is:

Code: Select all

<input name="username" size="20" />
		  <select name="domain_select" id="domain_select">
		    <option value="domain.com">domain1.com</option>
		    <option value="domain2.com">domain2.com</option>
        </select>
and then is sending data to other page which is config.php and

Code: Select all

$username = 'username'; // This variable is the cPanel username
$password = 'password'; // Please enter your cPanel password
$domain_name = 'domain1.com, domain2.com'; // Please enter the domain name associated with the account
$domain_select = $domain_name;
$skin = 'x3'; 

and then it will process to other page which is

"http://$username:$password@$domain_name:2082/frontend/$skin/mail/doaddpop.html?email=$_POST[username]&domain=$domain_name&password=$_POST[password]&quota=25");

For some reason is not working right, event i put

Code: Select all

$domain_name = 'domain.com, domian2.com';
between two domain im getting result of domain1.com.
i also changed the variable name to

Code: Select all

$domain_name = '$domain_select ';
and still not working.

Can anyone help me how can i solve this by select one domain name from menu before create email account!

please help thanks.

AM

Re: Email creator

Posted: Wed Apr 20, 2011 1:57 am
by zyntrax
What method is your form posting in?