Ok First I have a very simple way of entering data into a form and saving that into a text file,
I made two text files for username(text1) and password(text2) , I would like to make a simple login with the outcome out this,
Code for Registration: - Dim savefile As Long
-
savefile = FreeFile()
-
Open "I:\College Work ------- Updated 2008 March\new-work\savedfile.txt" For Output As #savefile
-
Write #savefile, (Text1.Text); (Text2.Text)
-
Close #savefile
From entering data it is saved into 'savedfile.txt' , and is displayed as:
"carl2k2","mypa ssword"
I would Like to have a simple login form so it would ask for the user to input their username and password(using two seperate text boxes again), so it will read the 'savedfile.txt' to see if what the user entered is correct, if then not then a simple if statement would be like msgbox("Incorre ct Values,") or something like that,
(ps, I did have a similar post but that was about something else which I dont think I need now)
1 3079 jeffstl 432
Recognized Expert Contributor
Ok First I have a very simple way of entering data into a form and saving that into a text file,
I made two text files for username(text1) and password(text2) , I would like to make a simple login with the outcome out this,
Code for Registration: - Dim savefile As Long
-
savefile = FreeFile()
-
Open "I:\College Work ------- Updated 2008 March\new-work\savedfile.txt" For Output As #savefile
-
Write #savefile, (Text1.Text); (Text2.Text)
-
Close #savefile
From entering data it is saved into 'savedfile.txt' , and is displayed as:
"carl2k2","mypa ssword"
I would Like to have a simple login form so it would ask for the user to input their username and password(using two seperate text boxes again), so it will read the 'savedfile.txt' to see if what the user entered is correct, if then not then a simple if statement would be like msgbox("Incorre ct Values,") or something like that,
(ps, I did have a similar post but that was about something else which I dont think I need now)
One thing to note is that the format of your .txt string must be consistent for this below to work.
In other words, in this example user name is always 5 characters long as well as password -
Open strFileName For Input As #1
-
Line Input #1, strrecord
-
strUser= Left(strrecord, 5) 'use these string filters to get your values
-
strPass= Mid(strrecord, 10, 5) 'use these string filters to get your values
-
-
I didn't actually test this for accuracy but check this out for a better examples http://www.w3schools.com/vbscript/func_mid.asp
It will be something like that though to get those values then compare them to the entered values of the text boxes -
if txtUserName.Text <> strUser then
-
'invalid user
-
end if
-
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: JaNE |
last post by:
Hello, I have made my cms... and is working, but have some, let me say
"bugs"... And I don't know all reasons, please allow me slightly longer
and most probably confusing post (that "confusing" is mainly becaose of
my bad english, and that bad english is also reason why am I learning
php that slow...).
As first, what is problem:
some users after succsesfull registration and login can not see
"memeber_menu" and can not activly participate...
|
by: Gleep |
last post by:
I've searched google intensely on this topic and it seems noone really knows how to approch this.
The goal I don't want clients to give out their usernames and passwords to friends, since the site
relies on subscrption fees.
Sessions ID's are matched between the browser and the server. So a users can login with same
username and password and those sessions are tracked individually.
Some suggest create table fields with the session ID...
|
by: Newbie |
last post by:
Hi all,
Just want to comment on this thread.
Seems like every discussion about this matter (setting up DB provider for membership) and all the samples/references given by some MVPs always refering to LOCALHOST in their solution. Aren't they all forget that people build an ASP.NET appl are plans to host their appl in an commercial hosting provider, whom most of them can't afford the fancy of dedicated servers - most of them hosts on shared...
|
by: drah |
last post by:
Hello not exactly sure if it is a php script problem or a database/table issue i apologize if i'mposting in wrong category. I was asked to put a login script on a site for someone and i made the database,tables needed but when you enter a username and password to register the database,table records dont write the information so when attempting to login it states name/pass dont exist here is the registration.php file if anyone can point me in the...
|
by: AppleBag |
last post by:
I'm having the worst time trying to login to myspace through code. Can
someone tell me how to do this? Please try it yourself before replying,
only because I have asked this a couple of times in the past in other
places, and while the help was much appreciated, it seemed everyone
just wanted to 'theoretically' explain how to do it, but when I tried
to do it myself, I couldn't login.
I want to simply pass the email address and password to...
| |
by: wislace |
last post by:
Please I have created a Login Page and a Registration Page Using Dreamweaver.Please Can somebody help me so that when somebody Login,it opens a Window that contains only His Registration Page
|
by: sandy |
last post by:
hello,,,,,,,,,
i am creating login page using Perl/CGI facing prob... able to
connect DB but from there facing prob
If u have related code of login page in Perl please send me on
sandip.bhosale@gmail.com
please help me
i am using MySQL as DB user name:root password:root database name:ITS
|
by: satishknight |
last post by:
Hi,
Can some one tell me how to change the validation sequence for the code pasted below, actually what I want it when any one enters the wrong login information (already registered users) then it has to tell then them its wrong information but currently it takes then to a next page and then tells them its incorrect information. This is tedious as every time they enter wrong they will be redirected to a different page and then they have to...
|
by: jerrydigital |
last post by:
Hello,
I have created a login.asp page which i have posted below. When I login into my site, it automatically takes me to the redirect page "index.html" which means that i entered the wrong login information.
I believe i am not connecting to the access table correctly.
Here are some of the characters I used(hope this helps clear up my asp page)
Email --- this is the title to the login column in my access table
Password --- password...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |