Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running 'cmd' locally on a server

Status
Not open for further replies.

ajtsystems

IS-IT--Management
Jan 15, 2009
80
0
0
GB
I have a web page which takes textbox input see:

<html>
<head>
<title>Process the HTML form data with the POST method</title>
</head>
<body>
<form method="POST" action="process.asp" name="form1">
<table width="70%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>username:</td>
<td colspan="2"><input type="text" name="username"></td>
</tr>
<tr>
<td>password:</td>
<td colspan="2"><input type="text" name="password"></td>
</tr>
<tr>
<td>comments:</td>
<td colspan="2"><textarea name="comment" cols="40" rows="5"></textarea></td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2"><input type="submit" name="Submit" value="Submit"></td>
</tr>

</table>
</form>
</body>

</html>

This then calls process.asp and process.asp prints the variables to screen. Process.asp...>

<%@ Language="VBscript" %>
<html>
<head>
<title>Submitted data</title>
</head>

<body>
<%
'declare the variables that will receive the values
Dim name, email, comment
'receive the values sent from the form and assign them to variables
'note that request.form("name") will receive the value entered
'into the textfield called name
username=Request.Form("username")
password=Request.Form("password")
comment=Request.Form("comment")

'let's now print out the received values in the browser
Response.Write("username: " & username & "<br>")
Response.Write("password: " & password & "<br>")
'Response.Write("Comments: " & comment & "<br>")
%>
</body>
</html>


What I am trying to do is use the username and password variables to run and pass to an apllication on the server. Is this possible, for example to run putty with the variables username and password.

In VBScript I know how to call an exe using a shell, is this the same thing possible?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top