ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl.net
perl.net
LogIn page and Counter and Database
by other posts by this author
Dec 17 2004 3:56AM messages near this date
view in the new Beta List Site
RE: Returning arrays: Bug or misunderstanding? | Gif counters
FRAMEWORK -------------------------------1103282957
Content-Type: text/plain; charset="US-ASCII"
Content-Length: 2816
Lines: 72

I am building a webpage  and I will like to include a  counter using gif on a 
Login page  I  only been working here for 2 weeks so I am sort of new at 
this.  

I   already  uploaded 10 gif images starting from (( 0.gif  to 9/gif))  which 
repersent numbers 0 to 9
 
Can anyone tell me how I  can make a digit  gif counter using CGI  PERL 
script to display on  a   log-in page name   index.cgi
 
I am using a UNIX  server
 
Also can anyone who me how  to make the fields in a LoginIn page  connect to 
a DATABASE  The  Fields are Username,  Password,  Name and State
 
The name of the DATABASE  is  cs356f04
 
The script I am suppose to  use to connect to the DATABASE is
 
#!usr/bin/perl
print"Content type:  text/plain\n\n";
use DBI;
$dbh=DBI-> connect('DBI:mysql:cs356f04',"ewilson","fall04") ||  die "can not 
connect\n";
 
--------------------------------------------------------
# $dbh is a database  handle  and it should allow me to perform operation on 
the database such as  create a table, insert, delete , update and select.
----------------------------------------------------------------
The name of the  table  in the DATABASE is capitol_customer
 
+---------------------------------+-------------------+---------+-------+-----
------+---------+
|  Field                          |  Type               | Null    | Key | 
Default | Extra  |
+---------------------------------+-------------------+---------+-------+-----
-------|----------
capitol_ customer_id     | int(10)             |           | PRI   |  0       
     |            |
|  password                        | varchar(10)    |            |          | 
               |            |
|  name                                | varchar(20)   | YES   |          | 
NULL     |            |
|  state                                   | char(2)           |  YES  |      
    |  NULL    |             |
+----------------------------------+-------------------+--------+-------+-----
------+--------+
4  rows in set (0.00 sec)

--------------------------------------------------------------
 Now what I would  like to do is to make a  login screen that ask for  the 
user to  enter a username and password.
Also I want a option for a  new user to click to take them to another page to 
enter the following  information for NewUsers only  customer id  password  
name and  state.  All of the information is to be stored inthe above database  
table.  Also I need a FORGOT password  retrivial feature screen by  entering 
the name ID and state if possible
 
Like I said I only been on  the job for 2 weeks and I was given this task to 
complete by Friday at  noon.
 
I know this may seem easy  for a lot of you in here but I am just starting 
out and I need  help.
 
Atlas Industries  
 
Eric Wilson 
Website  designer
Washington,  DC
202-361-8291


-------------------------------1103282957
Content-Type: text/html; charset="US-ASCII"
Content-Length: 7425
Lines: 165

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 
<HTML> <HEAD>
<META http-equiv=Content-Type content="text/html; charset=US-ASCII"> 
<META content="MSHTML 6.00.2800.1479" name=GENERATOR> </HEAD>
<BODY id=role_body style="FONT-SIZE: 12pt; COLOR: #0000ff; FONT-FAMILY: Arial" 
bottomMargin=7 leftMargin=7 topMargin=7 rightMargin=7> <FONT id=role_document 
face=Arial color=#0000ff size=3> 
<DIV> <FONT face="Times New Roman Greek" color=#000000>I am building a webpage 
and I will like to include a&nbsp; counter using gif on a Login page&nbsp; I 
only been working here for 2 weeks so I am sort of new at this.</FONT>  
<DIV> &nbsp;</DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000>&nbsp;I&nbsp; 
already&nbsp; uploaded 10 gif images starting from (( 0.gif&nbsp; to 9/gif)) 
which repersent numbers 0 to 9</FONT> </DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000></FONT>&nbsp;</DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000>Can anyone tell me how I 
can make a digit &nbsp;gif counter using CGI&nbsp; PERL script to display on 
a&nbsp;&nbsp; log-in page name&nbsp; &nbsp;index.cgi</FONT> </DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000></FONT>&nbsp;</DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000>I am using a&nbsp;UNIX 
server</FONT> </DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000></FONT>&nbsp;</DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000>Also can anyone who me how 
to make the fields in a LoginIn page&nbsp; connect to a DATABASE&nbsp; The 
Fields are Username,&nbsp; Password,&nbsp; Name and State</FONT> </DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000></FONT>&nbsp;</DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000>The name of the DATABASE 
is&nbsp; cs356f04</FONT> </DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000></FONT>&nbsp;</DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000>The script I am suppose to 
use to connect to the DATABASE is</FONT> </DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000></FONT>&nbsp;</DIV>
<DIV> <FONT face="Times New Roman Greek" 
color=#000000> #!usr/bin/perl</FONT></DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000>print"Content type: 
text/plain\n\n";</FONT> </DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000>use DBI;</FONT></DIV>
<DIV> <FONT face="Times New Roman Greek" 
color=#000000> $dbh=DBI-&gt;connect('DBI:mysql:cs356f04',"ewilson","fall04") || 
die "can not connect\n";</FONT> </DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000></FONT>&nbsp;</DIV>
<DIV> <FONT face="Times New Roman Greek" 
color=#000000> --------------------------------------------------------</FONT></DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000># $dbh is a database 
handle&nbsp; and it should allow me to perform operation on the database such as 
create a table, insert, delete , update and select.</FONT> </DIV>
<DIV> <FONT face="Times New Roman Greek" 
color=#000000> ----------------------------------------------------------------</FONT></DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000>The name of the 
table&nbsp; in the DATABASE is <STRONG> capitol_customer</STRONG></FONT></DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000></FONT>&nbsp;</DIV>
<DIV> <EM><STRONG><FONT 
color=#000000> +---------------------------------+-------------------+---------+-------+-----
------+---------+<BR> | 
Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;| 
Type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;| Null&nbsp;&nbsp;&nbsp; |&nbsp;Key | Default | Extra 
|<BR> +---------------------------------+-------------------+---------+-------+------------|-
---------<BR> &nbsp; 
capitol_&nbsp;customer_id&nbsp;&nbsp;&nbsp; 
|&nbsp;int(10)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;| PRI&nbsp; &nbsp;| 
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;|<BR> | 
password&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;| varchar(10)&nbsp;&nbsp; 
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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+-------+-----------+--
------+<BR> 4 
rows in set (0.00 sec)<BR> </FONT></STRONG></EM></DIV>
<DIV> <FONT face="Times New Roman Greek" 
color=#000000> --------------------------------------------------------------</FONT></DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000>&nbsp;Now what I would 
like to do is to make a&nbsp;&nbsp;login screen that ask for&nbsp; the user to 
enter a username and password.</FONT> </DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000>Also I want a option for a 
new user to click to take them to another page to enter the following 
information for NewUsers only&nbsp; customer id&nbsp; password&nbsp; name and 
state.&nbsp; All of the information is to be stored inthe above database 
table.&nbsp; Also I need a FORGOT password&nbsp; retrivial feature screen by 
entering the name ID and state if possible</FONT> </DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000></FONT>&nbsp;</DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000>Like I said I only been on 
the job for 2 weeks and I was given this task to complete by Friday at 
noon.</FONT> </DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000></FONT>&nbsp;</DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000>I know this may seem easy 
for a lot of you in here but I am just starting out and I need 
help.</FONT> </DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000></FONT>&nbsp;</DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000>Atlas Industries&nbsp; 
</FONT> </DIV>
<DIV> 
<DIV> <FONT face="Times New Roman Greek" color=#000000>Eric Wilson </FONT></DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000>Website 
designer</FONT> </DIV>
<DIV> <FONT face="Times New Roman Greek" color=#000000>Washington, 
DC</FONT> </DIV>
<DIV> <FONT face="Times New Roman Greek" 
color=#000000> 202-361-8291</FONT></DIV></DIV></DIV></FONT></BODY></HTML>
-------------------------------1103282957--
Attachments:
unknown1
unknown2
unknown3
unknown4


Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved