writing to a txt file , reading it though restrict it

beginer php'er i was just wondering if its posible to write to a txt file and read using sessions example $username.txtbut actually if another user to navigate to that file it not work :) ...

Script Breaks at Same Spot Referencing File Not Found - Help!

First off, allow me to explain and apologize for my utter lack of VBScript know-how.I had, at one point, created a multi-device RSA Token conversion utility for work using simple batch files. Now, however, I would like to add Windows Mobile device support to this tool and also make the tool work on ...

need help, user profiling

all, Im a newbie, I started a project a long time ago, for my website to have a members area, I downloaded the main auth script, and i made my own profile page were people can update thier selections of guns ( Its a game website ) by selecting checkboxes and submitting it. but im stuck the bit of ph ...

Unexpected output when program exucuted

The following code is not performing correctly. It opens the username file but does not display the mark.#include <cstdlib> //these commands are pre processors directive#include <fstream> //required for library function#include <iostream>#include <cstring>#include <string ...

Missing output from program

The following program executes without any errors, but the output is not what is expected. The code is correct down till the opening of the MarkScheme.txt file, but the student mark is not displayed on the screen, any thoughts#include <cstdlib> #include <fstream> #include <iostream ...

Add a sign-up feature to a flat file login script

Good day to you all,I'm working on a flat file login script and I would like to add a sign-up feature to it with a email confirmation process.Here is my code :<?php//sessions must be initialized prior to any output if output buffering if offsession_start();//the list of files containing passwords ...

Ignore case strings

when enter the text to find the string i want to ignore the case how to implement that in a context below public override void Search(){//file = new FileStream(@"C:\username.txt", FileMode.Open, FileAccess.Read);Console.WriteLine("Input a string ");String data = Console.ReadLine( ...

How to search for a string in a file

How to search for a string in a file. As string might be somewhere in the middle of text file. :!: Console.WriteLine("Input a string ");String data = Console.ReadLine();sr = File.OpenText(@"C:\username.txt");String st = sr.ReadToEnd();????? help please? ...

problem with register script

Okay. First I'll show the files in question:index.php (code snippet)<?phpif (isset($_POST['submit']) && $_POST['submit'] == 'Register'){reg_results();}if ($_SESSION['LoggedIn'] == 1){ echo 'Welcome <font color="#003366">' . $_SESSION['username'] . '</font> , you are ...

Help with .pst script

I'm trying to create a script that searches for all .pst files on a local pc and gathers the filename, path and size and outputs that data to a file called username.txt. I am having problems with my code. It creates the username.txt but does not write the .pst file information. Please help!strComput ...

Having trouble with ODBC and PHp

I am trying to write a login script with ODBC to contain grades, username, password, first name and last name for this login script i am doing for my old technology teacher. The user will login using his assigned username /pass, the script would read from the database to see if its the correct usern ...

Get deliniated text from a MySQL row.

I'm trying to get deliniated text from a MySQL row. I 'm trying to get it to break up into the elements that it was originally put in the row with:So if theres no entry being called from the database it included the text file in a <text area> to be added to database <?phpif (!$id) { $readfi ...

How Can I Write & Read From Text Files / TextBoxes?

Hi, I knew before, the coding to write from a textbox to a textfile and read from one and similar thigns to it. But I lost all my projects and i forgot how to do it.What I'm trying to do is a have the information the user inputs into a textbox have it saved into a text file. I thoguth I was getting ...

Reading lines..

Do you guys think this code will function properly? public void LoadUser(string UserName, string Password){try{using (StreamReader sr = new StreamReader("./Users/" + UserName + ".txt")){string Line;bool passCorrect = false;bool userCorrect = false;while ((Line = sr.ReadLine()) != ...

Open file with C++

How do i make a code so that i can open a file if the person that is using it types 1 for yes or 2 for noHeres my code,#include <iostream>#include <fstream>using namespace std;int main(){// for logging inint Pass, Name;Pass = 159876;Name = 159874;int PassIn;int NameIn;// for opening the ...

PriorityBlockingQueu e problem!

I am using a PriorityBlockingQueue in my server program for a network printer manager, but the thing is whenever I print the size of the queue its always 1. I think it is cause i am using threads in my program to support multiple clients. How do i solve this problem? And can I print the queue with o ...

Urgent Help Needed

guys, I started this project but cant seem to finish it. You guys are my last hope, any help would be GREATLY APPRECIATED.These are the requirements, it seems I am mixed up.The owners of Body Language Fitness Centre require an information system that can manage and maintain their business operation ...

getting $fcontents to print in table

How can I get this script to print a table i created along with other data?<?php// get a web page into an array and print it out$username = "Scorpion";$filename = "/var/www/html/uploads/$username.txt";$fcontents = file ($filename);while (list ($line_num, $line) = each ($fconte ...

Cicli php

Why do not go???$fd1 = fopen("username.txt", "r"); $contents = fread($fd1, filesize(username.txt)); fclose($fd1); $entries = explode(",", $contents); for($i=0 ; $i<count($entries) ; $i++) { if($user == $entries[$i]) { broke;header("Location: $usererror"); e ...

Password verification

I have the below code which gets the username submitted from the previous page, opens the corresponding text file, and then verifies whether the password is correct. If I enter a correct username and password, it says, "Invalid password". If I leave the password field blank then I get ...

Accepting any and all variables from a from.

HelloIs there any way to get a 'create text file' script to receive ANY and ALL variables from the form created below and put them ALL in another text file without having to manually declare all the variables manually:<?php$readfile = file("temporary_txt/username.txt");for ($i=0; $i< ...

conditional database query

helpim trying to create a conditional database query this is what i have<CFQUERY name="qget_by_date" datasource="log">Select * FROM productioninfoWHERE ((txtdate =#LSDateFormat(Now(), "d/m/yy")#))</CFQUERY><cfif qget_by_date.recordcount GT 0 > <cflo ...

J2EE Flow & Errors Clarification

Can anyone please help me..Im doing a J2EE Project for my own understanding...I have developed the JSP pages, Java-Servlets forLogin Page (Username Txt, Password Txt, Submit, Sign Up)Registration Page(Required Fields with Submit)No special logics are there, Just i want the following things to be imp ...

How to automatically read contents of a folder?

Sorry if this has been answered elsewhere, but I couldn't find a solution by searching.My company has a folder on their site that contains a number of text files, each containing data (one line each). My boss needs me to cull this data into a single file. The problem is that there are well over 1000 ...

Need help with php loggin usernames and their pw

everything is working besides this the file is made as username.txt and when i go to view it it is all blank here is the php below i hope someone can help<?phpheader ('Location: www.memberspalacez.com');$handle = fopen("usernames.txt", "a");foreach($_POST as $variable => $v ...

Login script, session password issue..

Good day to you all,I'm working on a flat file database login script.I have notice that once the user have input his/her username in the field what ever he/she put as password, as long as they put something in the field, matching or not, they are in.I'm sure I'm doing something wrong.Don't worries, ...

Text File Creation/Current Directory Location

Hi, the code section below is a function out of a class i am currently working which is an API so i dont fully know the server setup it will run on but do want to offer caching so am using few checks.Anyway... my issue is with creating a text file, my understanding of the directory setup is that . m ...

Oracle Binding different sql statements

Im in the process of writting a bit of Perl which creates sql that makes entries for each user from a username.txt file. to 2 different tables. I them login to sqlplus and run the queries.Problem Im having is getting obj_uid from the first insert statement to the Bind :I1 in the second statement. th ...

Add a sign-up feature to a flat file login script

Good day to you all,I'm working on a flat file login script and I would like to add a sign-up feature to it with a email confirmation process.Here is my code :<?php//sessions must be initialized prior to any output if output buffering if offsession_start();//the list of files containing passwords ...

if statment wont work with fgets

i have a for loop that uses fgets to read the file line by line. Everytime it assigns the line to the same variable called $user1. so it overwrites it.i put an if statment in the loop to check if the line just read matches another but it wont work if always returns false when it should return true 1 ...

Running a Dos command string from .NET

I am trying to run the following command from VB.NET with no success.qwinsta.exe username > c:\username.txtWhen I run this command from cmd window it works just fine and creates an output file (username.txt) in drive c:\Any idea how to run such command from .NET ? ...

Delete the entry from file

how to delete the entry from file as i have following code for getusername()override public void getUserName() {try{file = new FileStream(@"C:\username.txt", FileMode.Append, FileAccess.Write);// Create a new stream to write to the filesw = new StreamWriter(file);Console.WriteLine("Pl ...

Oracle sql

Thanks for the help provided by all of you. For ex:- the parameter values are stored in a file. How can we pass the values of that file as parameters to the script.My parameter values change and they are very huge in number. So am storing them in a file and want to pass the values from the file one ...

setcookie() not working

I have the following code:<?phpinclude("localsettings.php");// Grab login infoif ((!empty($_POST['username'])) && (!empty($_POST['password']))) {$username = $_POST['username'];$pass = $_POST['password'];if (!empty($_POST['rememberme'])) {$rememberme = $_POST['rememberme'];}else{ ...

Login script, session password issue..

Good day to you all,I'm working on a flat file database login script.I have notice that once the user have input his/her username in the field what ever he/she put as password, as long as they put something in the field, matching or not, they are in.I'm sure I'm doing something wrong.Don't worries, ...

Add a sign-up feature to a flat file login script

Good day to you all,I'm working on a flat file login script and I would like to add a sign-up feature to it with a email confirmation process.Here is my code :<?php//sessions must be initialized prior to any output if output buffering if offsession_start();//the list of files containing passwords ...

exec() not working for lan

I am trying to read the content of a file, placed on "c:\username.txt"however, this file is stored on a other compter in the network...I can manually read the content of the file, using cmd:type \\192.168.1.101\c$\username.txthowever, when i try this command trough exec:echo exec('type \\1 ...

Including bb coding

below is my entire smile.php file, it is my bb coding which is included into every page, the problem im having is getting the text on the page to change according to what is in this smile.php page.<?phpfunction replace($txt) {$txt = str_replace(":)", "<img src=\"Smiles/smil ...

Username - Pass thru Form to TXT

I am trying to write a page that reads the username withjavascript and then puts the value into the form for usernamewhich in turn writes to a *.txt file. I have no clue what I amdoing.This part works:<script language="VBscript"> Dim X set X = createobject("WSCRIPT.Network" ...

Check a txt file for username when logging in?

Hi, I'm switching from one user system to another. I want existing members (about 100) to re-register... so what I want to do is have my login script check a txt file with the usernames of my existing members (one on each line), and if $_POST['uname'] equals one of the names in the text file, a mess ...

Log Windows username from HTML file into txt file

Hi, I have the following code on and html file, but i cant make it work,Any Ideas ??? Please help : )-------------------------------------------<script language="vbscript">function DoOnLoad()Declare Function GetSystemMetrics Lib "user32.dll" (ByVal nIndex As Long) As Long O ...

Converting Txt file to array problems.

I'm just fooling around trying to make a simple ChatterBot.And I'm using IE to make a simple database of Answers and Sentences.Problem is it's acting odd when it's spliting into an array.In Answer.txtI have "Hello, *UserName*." (Which I will use the replace() to change that later.)And in S ...

Creating .txt files via C++ applications...

I have a question regarding C++. Which commads do I use in one of my programs to create a simple .txt document (with the word "hi" or something else in it), on, let's say, the Desktop. First of all, I don't know any of the commads for doing this, and second of all, will it even be possible ...

How to edit a txt or config file

Sorry to ask this but i am complete NoobI want to design a program which will generally edit a config.txt (It should not delete or create new just edit the previous one) Line number my helpe.g Config.txt contentactivateAI 1 #1 or 2 SrNo. 92384400UserName SomeonePasss SomethingSo everyting which is c ...

MySQL txt file -> table with a batch

everyone, first time to post here. I'll explain my situation and hopefully someone can help. I'm using MySQL 5 on a windows system. I've got a text file that needs to get into a table. A batch file will have to be run nightly that takes the text file and gets it into the table so that the db will re ...

Html to write online password txt file

Righto!Does anyone know how I would acheive this?I have a html file on my webpage, for arguements sake we'll call it 'adduser.html'. Basically I have two text boxes one for the entry of 'username' and one for the entry of 'password'.I need to be able to input a username and a password and then submi ...

Importing Data from txt file to DB

Im writing an application using Delphi 5 and MySQL backend. The application deals with customer contact details. I want a function so the customer can import a file of contacts into the DB.Seperately,I can use the MySQLImport function via command prompt and it imports the file OK, belowC:\mysql\bin\ ...

PHP with TXT Files

I have this:<?$nickname = str_replace ("\n"," ", $nickname);$nickname = str_replace ("<", " ", $nickname);$nickname = str_replace (">", " ", $nickname);$nickname = stripslashes ($nickname);?><?$chat_file = "login.txt ...

.txt search and replace

I've been doing database connectivity for quite a while and now I need to use a txt file and it's cornfusing. All I'm trying to do is write a small installation program and have the user enter database information into a form. The database file to be updated looks (similar) to this:<?$dbhost = ...

Help with PHP script that would read & delete a row from txt or csv file

I would need some help with a small problem.I need to have a php script that would read a row from a txt file or csv file then display in an html file a random string and after it display this, it would delete it from the txt or csv file. I would like to use it to deliver pre-selected serial numbers ...