Thread: [News PHP Script Help, Anybody?] Need help on advanced script

Results 1 to 4 of 4
  1. #1 [News PHP Script Help, Anybody?] Need help on advanced script 
    Banned
    Join Date
    Apr 2011
    Age
    29
    Posts
    1,360
    Thanks given
    370
    Thanks received
    184
    Rep Power
    0
    Trying to make my own news PHP Script. I currently have it so you can post scripts, etc., and they store in a file/text document.

    Ok, so, I need it, so, theres a delete button (I can make it), but when clicked, it will delete the news post. I believe its a simple filehandler thing, like:

    Code:
    if(isset($POST_['submit'])) {
    
    $fhdelete = fdelete("news/news.php");
    
    $fhdelete; 
    
    }
    As you can see, I have $fhdelete defined, I just need to know how to make it actually work, Lol? I believe it's just a simple "$fhdelete;" But idk.

    I also need a script to open the text document on a page to edit it, you know? All help will be appreciated if it works and I will Rep++ and vouch! Thanks!
    Reply With Quote  
     

  2. #2  
    Valar Morghulis

    Laxika's Avatar
    Join Date
    Sep 2006
    Age
    32
    Posts
    2,813
    Thanks given
    1,804
    Thanks received
    274
    Rep Power
    2128
    PHP: unlink - Manual

    This will delete a file for you.

    PHP: fopen - Manual

    Open the file for writing...

    http://www.tizag.com/phpT/filewrite.php

    Writing...

    Why not just use google huh?

    Anyway I highly suggest to use SQL instead file saving. That's much easier to maintain and use.
    Reply With Quote  
     

  3. #3  
    Registered Member deleteme's Avatar
    Join Date
    Jul 2008
    Posts
    247
    Thanks given
    3
    Thanks received
    32
    Rep Power
    28
    You shouldn't use flat files.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Ant-Man's Avatar
    Join Date
    Aug 2010
    Posts
    1,018
    Thanks given
    277
    Thanks received
    177
    Rep Power
    452
    What ajjr said, you should really just use a DB and mysql.

    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. The Most Advanced Php Uploading script....
    By i alcher i in forum Website Development
    Replies: 2
    Last Post: 08-12-2009, 02:23 PM
  2. PHP Password Script
    By HyreScape in forum Website Development
    Replies: 4
    Last Post: 03-30-2009, 08:55 PM
  3. My First php script
    By DJ Cheetos in forum Website Development
    Replies: 5
    Last Post: 01-05-2009, 01:03 PM
  4. News system script
    By justino10950 in forum Website Development
    Replies: 5
    Last Post: 08-19-2008, 05:48 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •