codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Creating a simple client login / email database  Archive Import (Danielle) at 11:33 on Monday, July 07, 2003
 

I am in the process of designing my first solo professional website (yay!) and am interested in creating a simple cookie to store a user`s name so that I can put a simple note saying "Welcome back Mr. User!" whenever they return to the website. I would also be interested in storing their email address for later use in potential newsletters, etc. I have read that this may best be done in PHP, which I know nothing about, but am willing to learn and play with! Any thoughts on how I could do this or links to a good tutorial?

  Re: Creating a simple client login / email database  Yusairi at 11:51 on Monday, July 07, 2003
 

hello Danielle,

it`s PHP cookies technique.
try step by step, ok.
i`m trying the best to help you.

1. create first.php file and put this code :-

<html>
<?php
$user = "Guest";
if ($_COOKIE["name"])
{
$user = $_COOKIE["name"];
}

?>
<form name="form1" method="post" action="/forum/setcookie.html">
<input type="edit" name="user" size="20"></td>
<input type="submit" name="Submit" value="Submit"><br>
</form>
</html>


2. create setcookie.php file and put this code :-

<?php
$yus =$_REQUEST[`user`];
setcookie ("name",$yus);
?>
<html>
Set Cookie Done...
</html>


hopefully it work cause i`d developed my
previous application using this simple technique.

please refer my previous development
http://www.vss.com.my/jakim/MainWS.php

click on change area link.

"Gain More Fun Here"
http://www.vss.com.my
Yusairi: site expert
http://www.codetoad.com


  Re: Creating a simple client login / email database  Yusairi at 21:15 on Monday, July 07, 2003
 

hi danielle,
here i`m again...

please ignore first.php file on my previous
message. use this code (first.php) below.


<html>
<?php
$user = "Guest";
if ($_COOKIE["name"])
{
$user = $_COOKIE["name"];
printf("Hello %s<br>",$user);
}

?>

<form name="form1" method="post" action="/forum/setcookie.html">
<input type="edit" name="user" size="20"></td>
<input type="submit" name="Submit" value="Submit"><br>
</form>
</html>
Yusairi: site expert
http://www.codetoad.com


  Re: Creating a simple client login / email database  Elain at 08:36 on Thursday, November 25, 2010
 

Wonderful answer, and i also solved my question! Thank you!
----------------------------------------
flash menu|drop down menu|flash decompiler mac








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: How to check number of fields in form?
•  Re: where can i post my programs to the world?
•  Re: DHTML tabletree
•  Re: Needed script or whatever it is
•  Re: navigation of control
•  Re: Image on a HTML button
•  Re: Trouble w/strings in ASP
•  Re: how to print a report having many records.
•  Re: Creating a simple client login / email database


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010