Forums
This topic is locked
PHP & Sessions
Posted 27 May 2006 20:26:19
1
has voted
27 May 2006 20:26:19 Deon Holtzhausen posted:
Hi there,DW 8.0.2, PHP & mySQL
I use this in my ASP VBScript pages which I got from a NG.
<pre id=code><font face=courier size=2 id=code> <% if Session("MM_Username" <> "" then %>
Welcome <%= Session("MM_Username" %><br>
<A HREF="<%= MM_Logout %>">Log Out</A>
<%End If %>
<% if Session("MM_Username" = "" then %>
<form name="form1" method="post" action="<%=MM_LoginAction%>">
<table width="150" border="0" cellspacing="0" cellpadding="3">
<tr>
<td><b>Name:</b>
<input type="text" name="txtName">
</td>
</tr>
<tr>
<td><b>Password:</b>
<input type="password" name="txtPassw">
<br>
<font size="2">
<input type="checkbox" name="checkbox" checked>
remember me<br></font></td>
</tr>
<tr>
<td align="center">
<input type="submit" name="Submit" value="log in >>">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<%End If %></font id=code></pre id=code>
This works perfectly well for me. What it does is to welcome a visitor with his/her registrated name once logged in together with a Log out link. The log out is done with DW.
If the visitor is NOT logged in, it presents the visitor with the login form.
How can I accomplich the same with PHP? I will REALLY appreciate your help.
Regards,
Deon
Everyone of us is a pencil in the hand of a Loving God with which He writes Love Letters to the worlds.
~ Mother Teresa ~