SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict brain's Avatar
    Join Date
    Sep 2001
    Location
    Amsterdam
    Posts
    249
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ASP to PHP translation ?

    Could someone translate the following for me to PHP:

    <%@LANGUAGE="VBSCRIPT"%>
    <%
    If Request.Form("UfRemember") = "checkbox" Then
    Response.Cookies("UltraFaqUser") = Request.Form("Gebruiker")
    Response.Cookies("UltraFaqUser").Expires = Date + 30
    Response.Cookies("UltraFaqPas") = Request.Form("Paswoord")
    Response.Cookies("UltraFaqPas").Expires = Date + 30
    End If
    %>
    Thanks

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2001
    Location
    Mountain View, CA
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure about how to convert the if statement but probably something along the lines of ...

    <?php

    if($UfRemember) {

    setcookie ("UltraFaqUser", "$Gebruiker", time()+2592000);
    setcookie ("UltraFaqPas", "$Paswoord", time()+2592000);

    }

    ?>

    You can get more info on setting cookies in PHP at the following page.

    http://www.php.net/manual/en/function.setcookie.php
    John
    AdBizInfo - Online Advertising Resource
    Top10Links - Directory Of Top Sites
    MovieRumors - Movie Message Board

  3. #3
    epsilon transition cupid's Avatar
    Join Date
    Aug 2001
    Location
    Kent, Ohio
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not too savvy with asp.. but I'll give it a shot. Let me know if it works or not.

    I'm assuming that Date + 30 is 30 days from the current time of execution for the following script.

    PHP Code:
    <?php

    if ($UfRemember == "checkbox") {

    setcookie("UltraFaqUser",$Gebruiker,(mktime()+2592000));
    setcookie("UltraFaqPas",$Paswoord,(mktime()+2592000));

    }

    ?>

  4. #4
    SitePoint Enthusiast
    Join Date
    Sep 2001
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I think this a good one

    go to www.users.f2s.com and click on the useful information they have asp convert to php Ok good lukcy!
    NhanT

  5. #5
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    heh, i just tried that and it didn't return any php!
    Just a blank white area.
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  6. #6
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its for converting queries from SQL Server/Access to something that can be used in MySQL or PostgreSQL. First off the tool is weak and doesn't even work right, and its name is highly misleading.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •