Grow your CSS skills. Land your dream job.

Deleting a page with PHP[CMS]

  • # August 14, 2012 at 11:02 am

    Hi
    I have this CMS I’ve been working on, and I want the user to be able to edit and remove the pages within the site.
    I have it so it’s listing all the pages within the site, and I have a link to the right which gives the user the option to f.e. remove the page completely.

    Here’s a screen of it, might give you a better idea:
    See here

    The problem I have is I am not sure how to connect the link to each page, does anyone have a good solution for this?

    (I have it so I am listing the ID of each page to the right as well. Just not visible.)

    Thank you!

    # August 14, 2012 at 11:03 am

    What I mean is, how should I connect the link that is clicked to my delete_page_parse.php

    # August 14, 2012 at 2:16 pm

    I assume pages have an ID. Why not use that as part of a GET request attached to the link.

    Pseudocode:

    < ?php
    foreach ( $pages as $page ) {
    ?>

    < ?php echo $page->page-name; ?>
    < ?php echo $page->last-modified; ?>
    page-id; ?>">Delete page

    < ?php
    }
    ?>
    # August 14, 2012 at 4:47 pm

    I got my hands on another solution which worked :)

    Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".