I have a little project about databases and arrays where I have a text file database; call it 'database.txt'. I have a page that I wish to run a query ('username' and 'password') from 2 text boxes, and then the submit button is clicked. Code below:
<1--LOGIN PAGE-->
<form action="process.php" method="post">
Username: <input type="text" name="customer">
Password: <input type="password" name="password">
<button type="submit">Login</button>
</form>
From here, I want to be able to recall an array from the 'database.txt' file, where the server must search the file for an array where the username and password are in the same array (eg. IF PASSWORD and USERNAME are in the same ARRAY, RECALL all the elements in the array ONLY) and then the server recalls all the elements in that array. Something like a customer database pretty much. I want these elements to go into text boxes so that if I want to edit that record (the record being the array), I then type in the box where the particular element of the array is and hit a save button to save the record to the database.txt file
<1--PROCESS PAGE-->
<p>Username: <?php echo ''.$username.''; ?></p><br />
<p>Other information: <? echo ''.$name.', '.$address.',
'.$phone_number.'' //** this area for other elements in array **//
?></p>
The array format would be the following:
`array(username=>'',password=>'',name=>'',address=>'',phone_number=>'',`
enter code here...,...,...,)
(the ... indicating other elements)
I have studied Software Development this year in High school so my knowledge is limited, I do however know the basic operations of HTML and PHP. Also a new user to Stackoverflow...
I'm trying to keep the project to just HTML and PHP, and no SQL please (if thats possible)? Thanks