Hello all, Ive been making an signup page with the api but im having trouble assigning the newly created site to the client who signed up. By that i mean i set it up so everyone gets a subdomain with a hosting package. what i want to know is how to define/set the site owner in the api so that in the ISPCONFIG panel it shows its owned by the client. Ive attached the script i have (made in dreamweaver)
I thought i was doing that on line 483 ?? this is what happens in the client panel after using the form (see attached) Capture 2 is in the sites section, which makes me then have to add it manually. have i got something coded wrong?
No, you dont assign it to the client there. You add a client and then add a website without assignng it to the newly created client. Try this code: Code: $client_id = $client->client_add($session_id, 0, $paramsA); $site_id = $client->sites_web_domain_add($session_id, $client_id, $paramsB, $readonly = false);
so i would need to upload the sites_web_domain_add php as a separate file?? as i copied it into the one file thinking it could be done that way
Thanks so much till! what was the difference between what i had and you had that was making it fail? as all i can tell is just renaming $affectedrows to another name.
just a quick thought how would i now get my form to auto increment customer number? or set the same as client id