$_POST script.
I have a form that where someone types the username and password they want to have and it adds a client to my ispcontrol panel. when I try to just echo $_POST["username"] it works perfectly, but when I try to add it to the example script it creates a blank client with none of the information in it.
The PHP file is:
<?php
require('soap_config.php');
$client = new SoapClient(null, array('location' => $soap_location,
'uri' => $soap_uri));
try {
if($session_id = $client->login($username,$password)) {
echo 'Login successfull. SessionID:'.$session_id.'<br />';
}
$params = array( 'server_id' => 1,
'company_name' => '$_POST["company"]',
'contact_name' => '$_POST["name"]',
'username' =>'$_POST["username"]',
'password' =>'$_POST["password"]',
'language' =>'',
'usertheme' =>'',
'street' =>'$_POST["address"]',
'zip' =>'$_POST["zipcode"]',
'city' =>'$_POST["city"]',
'state' =>'$_POST["state"]',
'country' =>'$_POST["country"]',
'telephone' =>'$_POST["telephone"]',
'mobile' =>'',
'fax' =>'',
'email' =>'hello@remcycle.net',
'internet' =>'',
'icq' =>'',
'notes' =>'Auto',
'template_master' => '1',
'template_additional' =>'',
'default_mailserver' =>'1',
'limit_maildomain' =>'1',
'limit_mailbox' =>'-1',
'limit_mailalias' =>'-1',
'limit_mailforward' =>'-1',
'limit_mailcatchall' =>'-1',
'limit_mailrouting' => '-1',
'limit_mailfilter' =>'-1',
'limit_fetchmail' =>'-1',
'limit_mailquota' =>'-1',
'limit_spamfilter_wblist' =>'-1',
'limit_spamfilter_user' =>'-1',
'limit_spamfilter_policy' =>'-1',
'default_webserver' =>'1',
'limit_web_domain' =>'-1',
'web_php_options' =>"SuPHP",
'limit_web_aliasdomain' =>'-1',
'limit_web_subdomain' =>'-1',
'limit_ftp_user' =>'-1',
'limit_shell_user' =>'-1',
'ssh_chroot' =>'None',
'default_dnsserver' =>'1',
'limit_dns_zone' =>'-1',
'limit_dns_record' =>'-1',
'limit_client' =>'0',
'default_dbserver' =>'1',
'limit_database' =>'-1',
'limit_cron' =>'0',
'limit_cron_type' =>'',
'limit_cron_frequency' =>'-1');
$reseller_id = 0;
$domain_id = $client->client_add($session_id, $reseller_id, $params);
if($client->logout($session_id)) {
echo 'Logout.<br />';
}
} catch (SoapFault $e) {
die('SOAP Error: '.$e->getMessage());
}
?>
Could you tell me if I have a php or a ispconfig issue?
|
Recent comments
1 day 5 hours ago
1 day 10 hours ago
1 day 15 hours ago
1 day 16 hours ago
2 days 7 hours ago
2 days 7 hours ago
2 days 12 hours ago
2 days 18 hours ago
2 days 19 hours ago
2 days 20 hours ago