PHP problemo menu

User Tag List

Thread: PHP problemo

Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    Daegurth's Avatar Private
    Reputation
    6
    Join Date
    Oct 2010
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A quick look shows that you use
    Code:
    $deleteId = trim($_POST['delURL']);
    but do not give it to your function deleteBookmark();

    2nd:

    Code:
    for($i=0; $i<count($bookmarks); $i++) {
       //seperate each element and store it in a temporary array
      $tmp = explode(',', $bookmarks[$i]);
    					               
      //assign each element of the temporary array to an accossiative array key, overwriting the first $bookmarks entry
      $bookmarks[$i] = array('name'=>$tmp[0], 'URL'=>$tmp[1], 'category'=>$tmp[2], 'date'=>$tmp[3], 'counter'=>$tmp[4]);
    }
    
    $match = false; //you use it later but never set it. 
    					            
    //loop through the array, see if there's an 'id' match
    for($i=0; $i<count($bookmarks); $i++) {
       if(trim($bookmarks[$i]['link']) == $deleteId){
         //unset the bookmark entry if there's a match
         unset($bookmarks[$i]);
         $match = true;
         break;
       }   
    }
    as the code shows you do not have a "link" to eval against as you try in this code pcs: trim($bookmarks[$i]['link']) == $deleteId).

    It should be $bookmarks[$i]['URL']).

    3rd:
    You can properbly see it youself when you read this: $fh = fopen("txt/favourites.txt", "w"); (hint path is a bit wrong).

    Working code:
    http://pastebin.com/rmqK92Jy



    /**** Edit - remarks ****/
    At line 30 you make a check on isset($_GET["sort"]), to see if its present
    At line 31 you sign $_GET["sort"] to $order.

    The code/script after this will make errors if(!isset($_GET["sort"])). This can be fixed by doing like this:
    PHP Code:
      if(!isset($_GET["sort"])){
        
    $_GET["sort"] = "name";
      }
      
    $order $_GET["sort"]; 

    At line 32 you create a file handle but never uses it. You can delete this line due to:
    At line 33 you read the content of you file fav*.txt into an array

    Because you only read the content of the file at this moment you do not need a file handle.

    At line 64 you create the "<tr" tag, but you dont create it proper ^^. Fix <tr>
    Last edited by Daegurth; 10-23-2010 at 02:55 AM.

    PHP problemo
  2. #17
    ~OddBall~'s Avatar Contributor
    Reputation
    207
    Join Date
    Jan 2008
    Posts
    1,156
    Thanks G/R
    4/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dude you're a legend, thanks a bunch. Unfortunately I have to spread before I can +Rep again
    https://www.mmowned.com/forums/world-of-warcraft/guides/278302-selecting-bot-you.html - SELECTING THE BOT FOR YOU

    PHWOOOOAAAAAR - Parog was here. <3 <----Wtf's a Parog?

Page 2 of 2 FirstFirst 12

Similar Threads

  1. .php problems
    By Etaile in forum Community Chat
    Replies: 6
    Last Post: 07-31-2010, 07:03 PM
  2. I need PHP help!
    By chanceless in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 10-30-2007, 08:20 AM
  3. Setting up PHP?
    By Volcomchamp in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 10-03-2007, 11:37 AM
  4. Addon To The Php Login Scam
    By paulgreen73 in forum WoW Scam Prevention
    Replies: 3
    Last Post: 06-11-2007, 04:09 PM
  5. Hey PHP People!
    By Tory in forum Community Chat
    Replies: 0
    Last Post: 09-30-2006, 07:40 PM
All times are GMT -5. The time now is 07:23 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search