Convert ASP to PHP

Any recommendations to convert this asp to php/mysql?

Yes, learn PHP and re-write the code.
Paul Davis
http://www.kaosweaver.com/
Visit us for dozens of useful Dreamweaver Extensions.
http://www.communitymx.com/
Partner at Community MX - Extend your knowledge
jsteinmann wrote:
> Any recommendations to convert this asp to php/mysql?
>
> <%@LANGUAGE="VBSCRIPT"%>
> <!--#include file="Connections/cnConn.asp" -->
> <%
> if request.form <> "" then
>
> dim username, password, DateExpire
> username = request.form ("username")
> password = request.form ("password")
>
> set rs = Server.CreateObject("ADODB.Recordset")
> rs.ActiveConnection = MM_cnConn_STRING
> rs.Source = "SELECT * FROM members WHERE username = '" +
Replace(username,
> "'", "''") + "'" & "AND Password = '" +
Replace(password, "'", "''") + "'"
> rs.CursorType = 0
> rs.CursorLocation = 2
> rs.LockType = 3
> rs.Open()
> rs_numRows = 0
>
> session("username") = request.form("username")
> session("password") = request.form("password")
>
> if rs.eof or rs.bof then
> response.redirect "logon2.asp"
> else
>
> expire = rs("MemberExpire")
> ip = rs("ip")
> ip2 = rs("ip2")
> ccbillcustomer = rs("ccbillcustomer")
> session("id") = rs("id")
> session("firstName") = rs("firstName")
> session("LastName") = rs("LastName")
> session("MemberID") = rs("username")
> session("memberStatus") = rs("memberStatus")
>
> end if
>
> rs("LastLogin") = date()
> rs("ip2") = Request.ServerVariables("REMOTE_HOST")
> rs.Update
>
> if username = "" THEN
> response.redirect "join.asp"
> elseif session("firstname") <> "" and
session("lastName") <> "" and
> session("memberStatus") = "suspended" THEN
> response.redirect "account_update.asp"
> elseif session("firstname") <> "" and
session("lastName") <> "" and expire <
> date() THEN
> response.redirect "join_renew.asp"
> elseif session("firstname") <> "" and
session("lastName") <> "" and expire =>
> date() THEN
> response.redirect "members/index.asp"
>
> else
> response.redirect "login.asp?err=true"
>
> end if
> end if
> %>
> <%
> rs.Close()
> Set rs = Nothing
> %>
>

Similar Messages

  • Going from ASP TO PHP

    I have been with this company for the past 10 years and NOW
    they are no longer going to support ASP and they are only going to
    focus on PHP. Is there a program that will convert asp to php? Is
    this even something I should attempt as I do not know any coding
    except what I have learned along the way. Thank you in advance.

    > Besides with PHP you get David Powers; who could ask for
    more :)
    Indeed.
    What I really like about PHP is that I can do in one or two
    commands what
    would take me 8 or 10 lines of code in VBScript. And David
    Powers.... 8)
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "JBWebWorks" <[email protected]> wrote in
    message
    news:ghc4rf$ro3$[email protected]..
    >I was an ASP user for many years and switched to PHP and
    am very glad that
    >I
    > did. I used Web Assist and continue to do so and have
    learned to develop
    > somewhat where any extension would not do what i wanted.
    I have found PHP
    > to be
    > much easier to learn beyond the basics (especially in db
    connections).
    > i have moved dozens of sites from ASP to PHP and there
    was no transfer
    > available that i could find, so i just started page by
    page. I have found
    > that
    > PHP has been more reliable.
    > I saw the posting thread on WA about not supporting ASP
    but feel that i
    > surely
    > have gotten my moneys worth out of the extensions that i
    bought and they
    > all
    > transferred to PHP.
    > Besides with PHP you get David Powers; who could ask for
    more :)
    >
    >
    >

  • Converted internalServerReporting from .php to .cfm

    I posted this on the general discussion forum but it doesn't seem to be getting any looks....
    Hi
    I recently converted the internalServerReporting.php file to .cfm, since I'm not yet using a LMS and I just needed to capture quiz results.
    I'm writing the results of my Captivate 7 quiz to a .txt file successfully (an insert query too). My Captivate 7 quiz completes and immediately after the user fills out and clicks the Send button in the Post Results dialog box (where they enter their name and email id) I get an Adobe Captivate error message in a dialog box with "Unknown Error" and an OK button.
    I think this is a Captivate error and not a Coldfusion error, as my Coldfusion "internalServerReporting.cfm" writes the text file as expected, and the Coldfusion server error logs are empty. Does anyone know how I can turn on/enable any available debugging data in Captivate so that I can trap this error?
    For your convenience my .cfm file is pasted below.
    Thanks in advance for your help,
    Rich
    Rich Leach
    Interactive Media Developer
    Advanced Certified ColdFusion Developer
    <cfsavecontent variable="results">
    <cfoutput>
    Company name: #form.companyname#<br>
    Department name: #form.departmentname#<br>
    Course name: #form.coursename#<br>
    File name: #form.filename#<br>
    File data: #form.filedata#<br>
    <cfset retXml=#xmlParse(form.filedata)#>
    Learner name: #retXml.Course.LearnerName.xmlAttributes["value"]#<br>
    Learner email: #retXml.Course.LearnerID.xmlAttributes["value"]#<br>
    Lesson name: #retXml.Course.LessonName.xmlAttributes["value"]#<br>
    Quiz attempts: #retXml.Course.QuizAttempts.xmlAttributes["value"]#<br>
    Total questions: #retXml.Course.TotalQuestions.xmlAttributes["value"]#<br>
    Status: #retXml.Course.Result.CoreData.Status.xmlAttributes["value"]#<br>
    Location: #retXml.Course.Result.CoreData.Location.xmlAttributes["value"]#<br>
    Raw Score: #retXml.Course.Result.CoreData.RawScore.xmlAttributes["value"]#<br>
    Max Score: #retXml.Course.Result.CoreData.MaxScore.xmlAttributes["value"]#<br>
    Min Score: #retXml.Course.Result.CoreData.MinScore.xmlAttributes["value"]#<br>
    Session Time: #retXml.Course.Result.CoreData.SessionTime.xmlAttributes["value"]#<br >
    </cfoutput>
    </cfsavecontent>
    <cffile action="write" file="/Applications/ColdFusion10/internal.timetracker/runtime/work/Ca talina/localhost/tmp/captivateTestResults.txt" output="#results#" nameconflict="overwrite">

    Jim
    ...jeez, what a rookie mistake....
    I did some debugging and found this reported error in my browser (Chrome):
    XMLHttpRequest cannot load http://127.0.0.1:8503/captivate/internalServerReporting.cfm. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
    From my years of web development I immediately recognized this error; it's a cross domain issue. But, I'm running everything localhost, what's not in the same dom.... Oh yeah, right after publishing the Captivate movie a dialog box appears "Publish was successful. Do you wish to view the output?" Naturally I clicked yes, which opened the .html file locally in my browser (as in File:Open) and NOT served from the web server (as in http://127.0.0.1/myCaptivateTest/).
    As soon as I ran my Captivate test movie from the web server everything ran just fine.
    Thanks for your help and patience. This script officially now works, so if anyone needs to record Captivate test/quiz results on a Coldfusion server, feel free to copy the above Coldfusion code into your own "internalServerReporting.cfm" and tell Captivate in your preferences where to expect it on your Coldfusion server.
    Rich

  • How to send some text to an ASP or PHP page?

    How to send some text to an ASP or PHP page with HTTPService?
    I'll store the submitted text to database through the page.
    Thanks!

    Set up an HTTPService. the xml inside the mx:request area
    will be passed using the method you define in the httpservice tag.
    <mx:HTTPService id="serviceName"
    url="
    http://www.site.com/page.php"
    useProxy="false" method="POST" showBusyCursor="true" >
    <mx:request>
    <val1>value 1</val1>
    <val2>value 2</val2>
    <val3>value 3</val3>
    </mx:request>
    </mx:HTTPService>

  • Would like to know if mobileme will support .ASP or .PHP anytime soon?

    Does anyone know if Apple will consider having .ASP and .PHP supported on their network????

    Better ask the question in the MobileMe forum.
    But the answer will be the same : nobody knows.
    Send a feedback : http://www.apple.com/feedback/mobileme.html

  • Is it possible to execute a ASP/CGI/PHP script thru sockets?

    hi,
    i was wondering whether it is possible in Java to pass data and execute ASP/CGI/PHP script on demand thru sockets (suppose a port has been specified by both sides) and how? i know this is possible thru the urlConnection, but how about sockets? these scripts could be stored in specific directories on the server.
    thanks!!!

    hi,
    i was wondering whether it is possible in Java to pass
    data and execute ASP/CGI/PHP script on demand Yes, completely it's possible!
    If you need to access ASP/CGI/PHP/Servlet/JSP thru' Java program, you can refer:
    http://developer.java.sun.com/developer/qow/index.jsp
    [after a week: http://developer.java.sun.com/developer/qow/archive/index.html
    and look for 'Can I send an HTTP request to a servlet from a normal class without having to use a browser to send the HTTP requests?']
    -and that's the QOW [Question Of the Week]!
    thru sockets (suppose a port has been specified by both
    sides) and how? When you say, a port has been specified on both sides,
    then it becomes, a NET/Socket programming and you
    need to use the 'net' package for the same.
    i know this is possible thru the urlConnection, 'possible' means, it's assumed that u're invoking the 'script' thru' a web-server!
    And u still use 'http://...' protocol to achieve the same; and u're NOT
    directly accessing the script file as "file:\\network-host\root\files\abc.jsp"
    but how about sockets? these scripts
    could be stored in specific directories on the
    server.It's not at all possible to 'invoke' those 'scripts' directly, by
    using sockets; If you know that they're existing in one
    particular directory of a network system, all you can do is
    you can read the file content thru' socket, but you can't
    make it become 'alive' and it would not dance for u!
    Because, if there is a 'script' [PHP/ASP/CGI/JSP] that is
    meant for dancing, then the stage for dancing is provided
    by the web-server environment which starts the appropriate
    server-side process that can understand and interpret the
    given script! And all we can do is asking the web-server
    to pull the 'script' to the stage and dance for you! But,
    the 'asking' the webserver can be done thru' browser or
    a URLConnection! If what you want to do would have been
    possible, then, just with FTP we could have achieved the same!
    Easy Go Jolly Java!
    -RK

  • Need help on integrating htmldb with asp/jsp/php

    Hello there, we have a few existing htmldb applications running at the moment, and now we would like to develop some asp/jsp/php applications. However there is one issue we still haven't solved yet, which is the SESSION(Login) problem. We don't know how the session is being generated, how to pull out session values manually from db etc etc.
    If you have done this before or any ideas, will be much appreciated.
    Thanks very much
    James

    James,
    sometimes it makes sense to look at these things from a different (and broader) perspective.
    Especially in a context of a corporation it makes sense to use a Single Sign On (SSO) server for authentication (usually against LDAP) . Something like Netegrity Siteminder, Oracle SSO Server (as part of Oracle Internet Application Server) or something similar.
    Then you could have all your applications use the authentication method of the SSO server which will keep track of the valid session and the applications that participate in the SSO context.
    On the Apex side you would have to write a custom authentication scheme to leverage that functionality, the session handling will no longer be of any concern to you.
    Just a different way to look at it.
    ~Dietmar.

  • GoLive CS y contenido dinámico: páginas ASP y PHP

    Alguien sabe si en la versión de GoLive CS ha desaparecido la utilidad de contenido dinámico?, me refiero a crear páginas ASP o PHP con consultas a bases de datos. No la encuentro en ninguna de las opciones, ni hay ninguna alusión en la ayuda. Me extraña mucho que hayan prescindido de esta utilidad porque en las tres últimas versiones de GoLive la fueron mejorando.
    Muchas gracias.

    Hola Miguel
    Pues sí, GoLive CS viene sin su "Contenido Dinamico"
    En los foros de GoLive en ingles, es un tema muy discutido, y existe una peticion firmada (?) por varios usuarios de GoLive, los cuales piden que lo reinstalen.
    Veremos que pasa con CS 2.
    Lo siento, pero si tienes el "6", no lo quites de tu computadora.
    Saludos
    Daniel Ulysses

  • How to convert asp to cold fusion?

    Hello All,
                This is nagaSeshu,I want to convert asp to clod fuasion.Right now our application is in simple asp,Because of some reasons we are planing to change our appliction into cold fusion.So is there any converters to convert asp into cold fusion pages automatically.If any one having idea about this please give me reply.
    Thanks &regards,
    NagaSeshu,

    An application in "simple ASP" should be straightforward to convert to CF, but it will nevertheless be a manual process.  There won't be a one-to-one correspondence between the ASP code and the CF code:  the CF equivalent is likely to be much smaller and simpler.
    The difference (and the potential advantage of CF) lies in its fundamental approach to the problem:
    ASP is, well, Visual Basic.  It's a programming language by nature, and a web-page is therefore "a script."  The web-server hands the car-keys to the page (full of executable code...) and the page drives the car to its destination.
    CF is, in general, much more of a declarative language.  The various documents contain a well-defined structure ... the structure of HTML itself ... and they are parsed and processed (conceptually speaking...) by an external processor which carries out the desired action based on the overall structure of the page that it sees.  Since "most pages of a certain type are more-or-less exactly the same, and there might be thousands of them," CF gives you a few well-chosen ways to build "pages like that" and to do so quickly.  CF "already knows how to drive the car to the destination," and the stuff that you write consists mostly of details.
    (I recognize that my description, above, of CF's actual modus operandi is not technically correct.  But the big-picture conceptual idea stands, and that's all I'm driving at here.)
    The best way to take advantage of a tool like CF in a conversion project is, "when in Rome, do what the Romans do."  Study CF to see what it can do "quickly and easily," and adapt your project's design to shamelessly take advantage of that way.  Do not spend a lot of time trying to figure out how to "jimmy" CF so that it will do a certain thing in a certain way.
    The choices that were made by CF's designers are pretty-good ones.  Although CF gives you "a full programming language if you want to use it," its greatest strength is in what you don't have to write in order to get "a certain thing" done.  If you find yourself writing a lot of programming, then you need to step-back and have another look:  "there's more than one way to do it."  CF's interpretation of a dot-NET application will be quite different from the original, and it should be.  If it isn't, you're not getting market-value out of the conversion effort.

  • Connect to VFP Application or convert VFP into PHP??

    Hi There
    We have a fairly sophisticated database that's written in VFP for MySQL.
    I'm building some insert/update pages for our customers to be able to insert and update records in the database, this is where it get's a little tricky. There is a program that handles certain business rules, and alos look's after assigning certain key's in a certain manner, to maintain database integrity.
    Now, I can insert certain fields into certain tables with no poblems...however one part of the program is looking at a table field, reading it for use in the record, then incrementing it - however it's not a plain old auto-number, the VFP program itself is incrementing it, as it is a combination of numeric & alpha values...
    so, would it be best to find some way of being able to connect to this program?
    or
    have the program converted so that the same procedures run on the database at the time of record insertion??
    Thanks
    Pete
    I have the VFP if anyone would like to see it...

    So he did provide a way to get at the data?
    There's an ODBC driver for Fox, too you know. But you can use COM objects - how familiar are you with PHP?
    COM objects (keep in mind, I'm running Mac and Linux now.. so going from memory); you have to register them first in the os. Then you can access them in PHP. Here's a decent tutorial @ http://www.phpbuilder.com/columns/venkatesan20030501.php3?page=1
    A .dll file is a library. Looks like he left you a set functions to use to interact with the program. So there's hope. You got some groking to do.

  • Asp and php upload code

    does any one have the code for upload-file form in asp,
    asp.net and php?
    files-path must go to an access database and the file to a
    folder, or is this not possible?
    many thanks

    Yes. OS X is a great webserver.
    OS X includes the Apache web server, so for basic pages there is no need to install anything. However, I recommend that you use Marc Liyanage's PHP package from http://www.entropy.ch/software/macosx/php/. It's really easy to install, and you can also use it with MySQL quite easily.
    If you want something else, XAMPP is also available for OS X at http://www.apachefriends.org/en/xampp.html. There even is a package called MAMP at http://www.mamp.info/. I haven't used these packages much, because the stuff mentioned in the previous paragraph suit my local testing needs.
    Unfortunately, I've never heard of people running ASP on mac. I doubt it's possible, but maybe someone else can help you out with that.

  • Calling LabView from ASP or PHP ?

    Hi;
    I was wondering if someone could help me.
    I need to control a spectrum analyzer remotely.. The VI's are ready, and I would Like to call/Run them from ASP/PHP in order to enable the remote client to interact with the VI's via a normal Web Browser.
    Tips:
    client should be able to send the VI's some data(variables).
    Get the results back and display it on the web page.
    Kind Regards
    K.S.
    Student

    In that case, you might want to check http://www.jeffreytravis.com/. He has a book called "Internet Applications in LabVIEW". The book was written before 6.0 introduced remote panels. There's also an application there available for download called LabVNC that might work for you. I haven't tried it but it sounds like it would do the trick.

  • Dreamweaver 8 with ASP, Coldfusion, & PHP

    I am new to php and I am trying to work thru Dreamweaver 8
    with ASP, Coldfusion and PHP Training from the Source. I have a
    real simple form. A user enters their first and last name then
    clicks the submit button. The form is then processed with a script
    using $_GET[first_name]; $_GET[last_name]; and it should display
    "Thank you, first_name last_name, for using my form." But the page
    show the html with a Notice: Undefined index: first_name in
    C:\htdocs\newland\test_form_processor.php on line 9. Line nine is -
    <p>Thank you, <?php echo $_GET['first_name']; ?>
    <?php echo $_GET['last_name']; ?>, for filling out my
    form.</p>. This was accomplished using the binding panel in
    DW. There is not any kind of trouble shooting in the book. Can
    someone tell me what this means? It worked like it is supposed to
    work when I had just the first name.

    Charles67 wrote:
    > I am new to php and I am trying to work thru Dreamweaver
    8 with ASP,
    > Coldfusion and PHP Training from the Source.
    I don't have a copy of that book. I wrote my own instead. ;-)
    > Notice: Undefined index: first_name in
    > C:\htdocs\newland\test_form_processor.php on line 9.
    Line nine is - <p>Thank
    > you, <?php echo $_GET['first_name']; ?> <?php
    echo $_GET['last_name']; ?>, for
    > filling out my form.</p>.
    It means that the first_name variable isn't being passed from
    the form.
    PHP is case-sensitive. Your form needs to look something like
    this:
    <form name="form1" id="form1" method="get"
    action="test_form_processor.php">
    <p>First name: <input type="text" name="first_name"
    id="first_name" /></p>
    <p>Last name: <input type="text" name="last_name"
    id="last_name" /></p>
    <input type="submit" name="submit1" id="submit1"
    value="Send" />
    </form>
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Convert .asp to .cfm?

    Hi,
    Does anyone know how to convert an asp file to a cfm file?
    I'm using Dreamweaver 8.

    1 very simple solution:
    change the .asp extension to .cfm :)
    No just kidding. There is not a standard way to do this.
    You'll need to rewrite your code from asp into coldfusion. There is
    no transformation script doing all the work for you, sorry and good
    luck

  • ASP problem -- PHP Wordpress site

    I have been asked to redo a site that is in .asp format;
    however, I host on Unix and do only phpmysql sites. The site is a
    law firm that is a subsidiary of a larger national firm and uses a
    form protected by an SSL. How can I possibly create a Wordpress or
    Joomla site for this without changing hosting?

    "Paevo Kelley" <[email protected]> wrote in
    message
    news:g3ovpd$hcm$[email protected]..
    >I have been asked to redo a site that is in .asp format;
    however, I host on
    > Unix and do only phpmysql sites. The site is a law firm
    that is a
    > subsidiary of
    > a larger national firm and uses a form protected by an
    SSL. How can I
    > possibly
    > create a Wordpress or Joomla site for this without
    changing hosting?
    unless their current host supports PHP and mySQL, you're
    probably going to
    have to change hosts. And if they have an SSL that's been
    generated for an
    IIS server, you're more than likely going to have to get that
    certificate
    re-issued for the new Apache server. Or is that form on their
    nat'l firm's
    site and not their local site?

Maybe you are looking for