ASP Free Lounge
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherASP Free Lounge

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 20th, 2006, 03:31 AM
Natascha Baker Natascha Baker is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 4 Natascha Baker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 39 m
Reputation Power: 0
Smile PHP to ASP

Hello
Can anyone help me with asp code? I try to convert a PHP page to ASP, thanks and x greetings from holland. Natas

PHP Code:
[QUOTE]<form name="schakelen" method="post" action="<?php echo $PHP_SELF; ?>"

<
div align="center"><font face="arial">  
                <
select name="pin1" size="1" id="pin1"
                  <
option value="0">Uit</option
                  <
option value="1">Aan</option
                </
select
                </
font></div>

<
div align="center"><font face="arial">  
                <
select name="pin2" size="1" id="pin2"
                  <
option value="0">Uit</option
                  <
option value="1">Aan</option
                </
select
                </
font></div>

<
input type="submit" name="Submit" value="Verstuur"


<? 
if (isset(
$_POST["Submit"])) {  
exec ('c:/lptwrite.exe 0000' $_POST["pin4"] . $_POST["pin3"] . $_POST["pin2"] . $_POST["pin1"]); 

?> [/QUOTE] 

Reply With Quote
  #2  
Old March 20th, 2006, 09:53 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 46th Plane (27500 - 27999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 27,737 Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)  Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 5 h 41 m 46 sec
Reputation Power: 1914
yep here you go:
Code:
<form name="schakelen" method="post" action="<%= Request.ServerVariables("Script_Name")%>"> 

<div align="center"><font face="arial">  
                <select name="pin1" size="1" id="pin1"> 
                  <option value="0">Uit</option> 
                  <option value="1">Aan</option> 
                </select> 
                </font></div>

<div align="center"><font face="arial">  
                <select name="pin2" size="1" id="pin2"> 
                  <option value="0">Uit</option> 
                  <option value="1">Aan</option> 
                </select> 
                </font></div>

<input type="submit" name="Submit" value="Verstuur"> 


<%
 Dim objShell, strCommand
 If Request("Submit")<>"" Then  
    Set objShell = Server.CreateObject("WScript.Shell")
    strCommand = "c:\lptwrite.exe 0000" &  Request("pin4") & Request("pin3") & Request("pin2") & Request("pin1")
    objShell.Run strCommand, False
    Set objShell=Nothing
 End If
%>

you need to grant permissions to IUSR account over the lptwrite.exe file
and all files associated with it.

Reply With Quote
  #3  
Old March 20th, 2006, 04:47 PM
Natascha Baker Natascha Baker is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 4 Natascha Baker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 39 m
Reputation Power: 0
Hello Shadow Wizzard
Thanks for u support, i have the permissions set to IUSR account on the lptwrite.exe and try the asp page but it doenst work.
When i try it at the promp and test the lptwrite.exe that wil be work fine, but with the asp page it doesnt work, maybe any suggest?
Thanks also and again
greetings from amsterdam xx Natascha

Reply With Quote
  #4  
Old March 20th, 2006, 04:51 PM
Natascha Baker Natascha Baker is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 4 Natascha Baker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 39 m
Reputation Power: 0
He thanks
Sorry but it works fine, i try to connect a other pin ah, wrong stupid me ha
thanks again x nats

Reply With Quote
  #5  
Old March 21st, 2006, 01:34 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 46th Plane (27500 - 27999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 27,737 Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)  Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 5 h 41 m 46 sec
Reputation Power: 1914
cheers Natascha, welcome to aspfree!

Reply With Quote
  #6  
Old March 30th, 2006, 05:52 PM
Natascha Baker Natascha Baker is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 4 Natascha Baker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 39 m
Reputation Power: 0
again problemens

Hello Shadow Wizzard

wel everythings works fine, but there is a problem again, i have install a new server ISS standaard on a windows 2000 machine and paste the page into it, set the rights on lptwrite.exe but it don't work
When i try go to the site www.domain/test.asp then i see the page but when i click on submit the page doesnt go further, i see the explorer try to go to the next page but he's searching searching . . . . doesn;t matter i hope understand my english) any idee what can be wrong? Thanks again xx natascha

Reply With Quote
  #7  
Old April 2nd, 2006, 03:41 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 46th Plane (27500 - 27999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 27,737 Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)  Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1Folding Points: 377762 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 5 h 41 m 46 sec
Reputation Power: 1914
99% there is anti virus installed on that server and blocking IIS...
try to disable the Script Blocking of the anti virus if possible
(for example Norton Anti Virus) or to remove the anti virus from
the server (Panda for example) and put something more proper for
servers.

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherASP Free Lounge > PHP to ASP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT