Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PHP] ASP to PHP

0 views
Skip to first unread message

Dwalker

unread,
Apr 13, 2003, 1:32:49 AM4/13/03
to Tim Burgan, PHP Lists
http://www.php.net/manual/en/faq.php


-----Original Message-----
From: Tim Burgan <bur...@iprimus.com.au>
To: PHP Lists <php-g...@lists.php.net>
Date: Saturday, April 12, 2003 11:59 PM
Subject: [PHP] ASP to PHP


>Here is some code in ASP that I want to convert to PHP.
>
>I honestly have no idea about much of PHP yet so I don't know where to
start
>with this.
>
>If someone has a minute, can you please get me started til I get my head
>around the language
>
>Cheers
>
>----------ASP Code------------------------
><%
>
> ' Declare Variables
> Dim MoveFile, strUserName, strPath
>
> ' Collect UserName from Form input
> strUserName = Request.Form("UserName")
>
> If Len(strUserName) = 0 Then
> ' no UserName entered
> 'Sub NoUserName ()
> Response.Write("Please <b>re-enter</b> your UserName")
> 'End Sub
> End If
>
> ' Check to see if folder already exists
> strPath = "C:\inetpub\wwwroot\" & strUserName
>
> Set MoveFile = CreateObject("Scripting.FileSystemObject")
>
> ' If folder doesn't exist, create it & move file
> If Not MoveFile.FolderExists(strPath) Then
> MoveFile.CreateFolder(strPath)
> MoveFile.CopyFile "C:\inetpub\wwwroot\templates\referred.htm", strPath &
>"\index.htm"
> 'Response.Redirect strPath & "\index.htm"
>
> Else
> ' UserName already exists
> Sub UserNameExists ()
> Response.Write("The Username you have selected <b>already exists</b>.
>Please try again")
> End Sub
> End If
>
> SET MoveFile = Nothing
>
>%>
>
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
>
><html>
><head>
><title>Enter your username</title>
></head>
><body>
><%
> ' Call NoUserName
> ' Call UserNameExists
>%>
><form name="frmSelectUsername" action="move-files.asp" method="post">
> Please <b>enter a Username</b> that you want to use<br>
> <input type="text" name="UserName" size="20">
> <input type="submit" value="Submit" name="submit">
></form>
></body>
></html>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Dwalker

unread,
Apr 13, 2003, 2:02:25 AM4/13/03
to Tim Burgan, PHP Lists
0 new messages