Προς το περιεχόμενο

php question!!!


chr_nikol

Προτεινόμενες αναρτήσεις

Δημοσ.

hello,

i've a mail-server that can add new users

via a command prompt with the commands:

 

winpop3.exe -useradd username password -d domain.com

 

\\\\\\\\\\\\\\\\\\\

 

i want the php code that will make a form with two fields username and password,

and when the form gets posted from a user, then it executes the command in a

windows command prompt.

(where username and pass should be $username and $password variables from the form...)

 

after executing the command in a command manually,

u get 2 messages...

 

account created successfully, or account already exists...

 

i would like after form gets posted and php executed to print the message that would display in the command prompt......

 

///////////////////////////

 

thanx for the support!

 

 

replys plz here:

 

[email protected]

[email protected]

  • 2 εβδομάδες αργότερα...
Δημοσ.
>
<? if($username && $password){
echo system("winpop3.exe -useradd $username $password -d domain.com");
}
?>
<form>
<table>
<tr><td>user</td><td><input type="text" name="username"></td>
<tr><td>passwd</td><td><input type="text" name="password"></td>
</table>
</form>

Δημοσ.
><? if($username && $password){ 
echo system("winpop3.exe -useradd $username $password -d domain.com"); 
} 
?> 
<form> 
<table> 
<tr><td>user</td><td><input type="text" name="username"></td></tr> 
<tr><td>passwd</td><td><input type="text" name="password"></td></tr>
<tr><td colspan="2" align="right"><input type="submit" value="Add user"></td></tr>
</table>
</form>

Δημοσ.

ida den dulevi....

ke ipa na kanw afto:

>
<? if($username && $password){ 
system("echo $username $password >> a.htm"); 
} 
?> 
<form> 
<table> 
<tr><td>user</td><td><input type="text" name="username"></td> 
<tr><td>passwd</td><td><input type="text" name="password"></td> 
<tr><td colspan="2" align="right"><input type="submit" value="Add user"></td></tr>
</table> 
</form>

 

gia na evlepa ti eftege...

ke ute afto dulepse!

 

opote kati trexi me to kodika

Δημοσ.

to winpop3 trexi apo pantu sta cmd twn win...

ine i entoli prosthikis mail xristi ston IIS pop3...

an ti grapso xirokinita tin entoli, kani return stin othoni egine o xristis ke sti lista xristwn fenete o neos...

otan to kanw se php de dulevi...

Αρχειοθετημένο

Αυτό το θέμα έχει αρχειοθετηθεί και είναι κλειστό για περαιτέρω απαντήσεις.

  • Δημιουργία νέου...