PHP Address Book: CRUD application using files
I do not know where to start. And by start, I mean an implementation of what to do next. I already have some readings on PHP, and I need to start on this project... for the lulz.
Now where oh where do I start? On the client side, I want an interface that allows the user to select if s/he wants to view the entire record, create , update, or delete.
Each address book entry is a file in a certain folder. And oh, i want this search feature that searches for an entry by last name, or first name, or address.
Any help? Thanks.
Re: PHP Address Book: CRUD application using files
You can start by passing your action through to the server-side. You can use a form to post it, or you can just use the URL.
Code:
<input type="button" value="Create" onclick="file.php?action=create" />
Then, from the server-side, you can easily determine your action by the following.
PHP Code:
<?php
$action = $_GET['action'];
if ($action == 'create') {}
?>
When editing or deleting a record, you will need to also pass some sort of ID. Then, you can use the ID to find the file.
Re: PHP Address Book: CRUD application using files
oh. okie. thanks. :D:D
The form method in the client would be GET, right? :D
Re: PHP Address Book: CRUD application using files
If you want to pass the parameters through the URL, then use GET. But, if you need to keep information secure, or your parameters are greater than 2083 characters, you need to use POST.