Hi again,

I am migrating my site from ASP to PHP. Things have been going OK, till I hit the login page.

Can anyone please help me convert this thing to PHP?
The live page is here:
http://www.regina.nu/visa.asp

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Inloggningssida</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="reginastilar.css" type="text/css" />
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="50%" border="0" align="center" class="normaltext">
  <tr> 
    <td height="274"> 
      <div align="center"> 
        <p> 
          <% if Request.Form("namn") = "kubrick" THEN 
response.Redirect("medlemsarea.php")%>
          <% else %>
          Tyv&auml;rr, det l&ouml;senordet var fel,<br />
          s&aring; du f&aring;r inte komma in h&auml;r.</p>
        <p>G&aring; <a href="login.php">tillbaka</a> och prova igen! 
          <% end if %>
        </p>
      </div></td>
  </tr>
</table>
<div align="center"></div>
<p>&nbsp;</p>
</body>
</html>
<!--#include file="Display.asp"-->

Recommended Answers

All 5 Replies

Member Avatar for cuonic

This should do the trick if I've correctly understood what Request.Form does

<?php if($_FORM['namn'] == "kubrick") { header("Location: medlemsarea.php"); } ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Inloggningssida</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="reginastilar.css" type="text/css" />
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="50%" border="0" align="center" class="normaltext">
  <tr> 
    <td height="274"> 
      <div align="center"> 
        <p> 
          Tyv&auml;rr, det l&ouml;senordet var fel,<br />
          s&aring; du f&aring;r inte komma in h&auml;r.</p>
        <p>G&aring; <a href="login.php">tillbaka</a> och prova igen! 
        </p>
      </div></td>
  </tr>
</table>
<div align="center"></div>
<p>&nbsp;</p>
</body>
</html>
<?php include("display.php"); ?>

Its not a big task to convert asp code to php most of the logics are same on the structure and syntax are different visit w3school.com for guide and you can easily change this code to bug free Php code.

----------------------------

keep a man interested

I changed the page back to ASP. Less hassle that way.
Maybe I'll do this later.
Thanks for your time, anyway!

Its not a big task to convert asp code to php most of the logics are same on the structure and syntax are different visit w3school.com for guide and you can easily change this code to bug free Php code.


Hey John thanks for that link, i checked out the site and found many tips that came handy with one of my projects ;)

____________________________________
3D Art

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.