The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

trying to save a new acc but i am not being able to...

Discussion in 'General Discussion' started by angra007, Aug 23, 2006.

  1. angra007

    angra007 Registered

    Joined:
    Aug 23, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    i think my package array is wrong... anyone know another way to do this remotely ?

    thx

    code:

    #!/usr/local/cpanel/3rdparty/bin/php
    <?php

    $user='root';$accesshash = 'myhash';
    require '/usr/local/cpanel/Cpanel/Accounting.php.inc';
    $host = "localhost";
    $usessl = 1;
    $array = listpkgs ($host,$user,$accesshash,$usessl);

    print_r(array_keys($array));




    if ($_POST['flag'] == 'add')
    {
    createacct ($host,$user,$accesshash,$usessl,"$_POST[dominio]","$_POST[usuario]","$_POST[senha]","$_POST[pacote]");
    }




    ?>





    <html>
    <head></head><body>
    <FORM METHOD='POST' ACTION='accadd.php' name='accadd'>

    Dominio<input name='dominio' type='text' size='40'><br>
    Usuario<input name='usuario' type='text' size='40'><br>
    Senha<input name='senha' type='text' size='40'><br>
    Plano <select name='pacote'>
    <?
    foreach($array as $key_val => $value)

    {
    echo "<option value='$key_val'>$key_val</option>";
    }
    ?>
    </select>
    <input name='flag' type='hidden' value='add'><input name='senha' type='submit'>




    </FORM>

    </body></html>
     
Loading...

Share This Page