CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2008
    Posts
    16

    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.

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    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.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Sep 2008
    Posts
    16

    Re: PHP Address Book: CRUD application using files

    oh. okie. thanks.

    The form method in the client would be GET, right?

  4. #4
    Join Date
    May 2002
    Posts
    10,943

    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.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured