Results 1 to 3 of 3

Thread: $per_page modification

  1. #1
    Join Date
    Feb 2008
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default $per_page modification

    Hi, I need some help with the following issue.
    I created a comment system with an administrator panel, where I can modify the site name, comments per page, etc. In the settings file I have the $per_page command which is as follows:

    $per_page = 5;

    In another file called general.php, I try to modify the value of $per_page in a textbox. The code is as follows:
    PHP Code:
    <input class="input"  name="per_page" id="per_page" tabindex="2" value="<?php echo "$per_page"?>" /></span></p>
    As for the submit, I have as follows:

    PHP Code:
    <?php
    if(isset($_POST['submit'])) {

    $per_page $_POST["$per_page"];

    $per_page SafeAddSlashes($per_page);

    header("Location: http://$SERVER_NAME$REQUEST_URL");
    }
    ?>
    I know I can use the fopen command to open the file however, what do I need to do exactly to be able to modify the $per_page value from another file?
    Kind Regards.

  2. #2
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  3. The Following User Says Thank You to alexjewell For This Useful Post:

    cssmaster (02-24-2008)

  4. #3
    Join Date
    Feb 2008
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your help.
    Kind Regards

Bookmarks

Posting Permissions

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