Jump to content

Zugzwangle

Members
  • Posts

    56
  • Joined

  • Last visited

Everything posted by Zugzwangle

  1. I have been given this formula. n = teams / 2... The teams should only be even numbers. n is always even!! (1,2,3,4... 2n .... ) which sums up to: if (i v j) ---> 1 < (|i-j| % 2n) < n - 1 , i = home, if (i v j) ---> n + 1 < (|i-j| % 2n) < 2n - 1, i = home, if (i v j) ---> (|i-j| % 2n) = n and ( i > j) i = home else i = away This produces an array of 12 teams such as: Where Rounds --> Matches --> Teams --> Team numbers Array ( [0] => Array ( [0] => Array ( [0] => 7 [1] => 1 ) [1] => Array ( [0] => 8 [1] => 2 ) [2] => Array ( [0] => 9 [1] => 3 ) [3] => Array ( [0] => 10 [1] => 4 ) [4] => Array ( [0] => 11 [1] => 5 ) [5] => Array ( [0] => 12 [1] => 6 ) ) [1] => Array ( [0] => Array ( [0] => 2 [1] => 1 ) [1] => Array ( [0] => 3 [1] => 7 ) [2] => Array ( [0] => 4 [1] => 8 ) [3] => Array ( [0] => 5 [1] => 9 ) [4] => Array ( [0] => 6 [1] => 10 ) [5] => Array ( [0] => 12 [1] => 11 ) ) [2] => Array ( [0] => Array ( [0] => 1 [1] => 3 ) [1] => Array ( [0] => 4 [1] => 2 ) [2] => Array ( [0] => 5 [1] => 7 ) [3] => Array ( [0] => 6 [1] => 8 ) [4] => Array ( [0] => 12 [1] => 9 ) [5] => Array ( [0] => 11 [1] => 10 ) ) [3] => Array ( [0] => Array ( [0] => 4 [1] => 1 ) [1] => Array ( [0] => 5 [1] => 3 ) [2] => Array ( [0] => 6 [1] => 2 ) [3] => Array ( [0] => 12 [1] => 7 ) [4] => Array ( [0] => 11 [1] => 8 ) [5] => Array ( [0] => 10 [1] => 9 ) ) [4] => Array ( [0] => Array ( [0] => 1 [1] => 5 ) [1] => Array ( [0] => 6 [1] => 4 ) [2] => Array ( [0] => 3 [1] => 12 ) [3] => Array ( [0] => 2 [1] => 11 ) [4] => Array ( [0] => 10 [1] => 7 ) [5] => Array ( [0] => 9 [1] => 8 ) ) [5] => Array ( [0] => Array ( [0] => 6 [1] => 1 ) [1] => Array ( [0] => 5 [1] => 12 ) [2] => Array ( [0] => 4 [1] => 11 ) [3] => Array ( [0] => 3 [1] => 10 ) [4] => Array ( [0] => 2 [1] => 9 ) [5] => Array ( [0] => 8 [1] => 7 ) ) [6] => Array ( [0] => Array ( [0] => 1 [1] => 12 ) [1] => Array ( [0] => 11 [1] => 6 ) [2] => Array ( [0] => 10 [1] => 5 ) [3] => Array ( [0] => 9 [1] => 4 ) [4] => Array ( [0] => 8 [1] => 3 ) [5] => Array ( [0] => 7 [1] => 2 ) ) [7] => Array ( [0] => Array ( [0] => 11 [1] => 1 ) [1] => Array ( [0] => 10 [1] => 12 ) [2] => Array ( [0] => 9 [1] => 6 ) [3] => Array ( [0] => 8 [1] => 5 ) [4] => Array ( [0] => 7 [1] => 4 ) [5] => Array ( [0] => 2 [1] => 3 ) ) [8] => Array ( [0] => Array ( [0] => 1 [1] => 10 ) [1] => Array ( [0] => 9 [1] => 11 ) [2] => Array ( [0] => 8 [1] => 12 ) [3] => Array ( [0] => 7 [1] => 6 ) [4] => Array ( [0] => 2 [1] => 5 ) [5] => Array ( [0] => 3 [1] => 4 ) ) [9] => Array ( [0] => Array ( [0] => 9 [1] => 1 ) [1] => Array ( [0] => 8 [1] => 10 ) [2] => Array ( [0] => 7 [1] => 11 ) [3] => Array ( [0] => 12 [1] => 2 ) [4] => Array ( [0] => 3 [1] => 6 ) [5] => Array ( [0] => 4 [1] => 5 ) ) [10] => Array ( [0] => Array ( [0] => 1 [1] => 8 ) [1] => Array ( [0] => 7 [1] => 9 ) [2] => Array ( [0] => 10 [1] => 2 ) [3] => Array ( [0] => 11 [1] => 3 ) [4] => Array ( [0] => 12 [1] => 4 ) [5] => Array ( [0] => 5 [1] => 6 ) ) ) If displayed as, Teams --> Rounds --> Home / Away.. it looks like this: Array ( [1] => Array ( [0] => 1 [1] => 1 [2] => 0 [3] => 1 [4] => 0 [5] => 1 [6] => 0 [7] => 1 [8] => 0 [9] => 1 [10] => 0 ) [2] => Array ( [0] => 1 [1] => 0 [2] => 1 [3] => 1 [4] => 0 [5] => 0 [6] => 1 [7] => 0 [8] => 0 [9] => 1 [10] => 1 ) [3] => Array ( [0] => 1 [1] => 0 [2] => 1 [3] => 1 [4] => 0 [5] => 0 [6] => 1 [7] => 1 [8] => 0 [9] => 0 [10] => 1 ) [4] => Array ( [0] => 1 [1] => 0 [2] => 0 [3] => 0 [4] => 1 [5] => 0 [6] => 1 [7] => 1 [8] => 1 [9] => 0 [10] => 1 ) [5] => Array ( [0] => 1 [1] => 0 [2] => 0 [3] => 0 [4] => 1 [5] => 0 [6] => 1 [7] => 1 [8] => 1 [9] => 1 [10] => 0 ) [6] => Array ( [0] => 1 [1] => 0 [2] => 0 [3] => 0 [4] => 0 [5] => 0 [6] => 1 [7] => 1 [8] => 1 [9] => 1 [10] => 1 ) [7] => Array ( [0] => 0 [1] => 1 [2] => 1 [3] => 1 [4] => 1 [5] => 1 [6] => 0 [7] => 0 [8] => 0 [9] => 0 [10] => 0 ) [8] => Array ( [0] => 0 [1] => 1 [2] => 1 [3] => 1 [4] => 1 [5] => 0 [6] => 0 [7] => 0 [8] => 0 [9] => 0 [10] => 1 ) [9] => Array ( [0] => 0 [1] => 1 [2] => 1 [3] => 1 [4] => 0 [5] => 1 [6] => 0 [7] => 0 [8] => 0 [9] => 0 [10] => 1 ) [10] => Array ( [0] => 0 [1] => 1 [2] => 1 [3] => 0 [4] => 0 [5] => 1 [6] => 0 [7] => 0 [8] => 1 [9] => 1 [10] => 0 ) [11] => Array ( [0] => 0 [1] => 1 [2] => 0 [3] => 0 [4] => 1 [5] => 1 [6] => 0 [7] => 0 [8] => 1 [9] => 1 [10] => 0 ) [12] => Array ( [0] => 0 [1] => 0 [2] => 0 [3] => 0 [4] => 1 [5] => 1 [6] => 1 [7] => 1 [8] => 1 [9] => 0 [10] => 0 ) ) As you can see, although there ARE a fairly distributed number of teams with home or away, in some cases there are long strings of matches at home, for some teams!! Can you help me sort this one out!! Please try if you can. Thanks in advance
  2. Hi all. I have a question involving a Round Robin sporting event. I want to create a formula to evenly distribute home and away matches. Firstly, to less complicate the situation, I need only consider even number participants in the tournament, as I would substitute a 'bye' with an extra number if need be. You can visualise the Round Robin Schedule below. However I am going to complicate the issue. This is a Single Round robin - so each team plays each other team ONCE only. From my own mathematical findings, I have found that: Participants 1). Matches per round = P / 2 2). Rounds = P - 1 3). Games (or I considered this the 'area' of the triangle, and hence a triangle number) , so the nth triangle number = (P^2 - P) / 2. (Multiply matches per round by Rounds) 4). If I create a Round Robin using a rotating formula such as this where the numbers rotate around the first number (1) the numbers are not correctly distributed between home and away R1 R2 R3 R4 12 16 15 etc .... 63 52 41 .... 54 43 32 .... =>>>> works out as If H = Home, A=Away Participant 1 HHHHH Participant 2 AAHHH Participant 3 AAHHH Participant 4 AAHHH Participant 5 AAHHH Participant 6 AAHHH An example of how the finished tournament would look like: Participant 1 HAHAH Participant 2 AHAHA Participant 3 HAHAH Participant 4 AHAHA Participant 5 HAHAH Participant 6 AHAHA Given I have already paired the participants, how might I go about formulating an equally distributed Single Round Robin Tournament!!
  3. Please excuse me requinix. That is correct!! $check_valid produces nothing, even though $team_selection echo's the team, and check_invalid_lineup() is a valid callable function...
  4. I have the following code: $new_model = new Model; $check_valid = $new_model->check_invalid_lineup($team_selection); echo $check_valid fails to work. I have checked, it is a valid function, with in my Model class, and I have set it to simply return the input parameter. So it looks like this: public function check_invalid_lineup($teamid) { return $teamid; } The variable $team_selection, is gained from another method in the Model class, instantiated by: $new_model = new Model; $user_info_select = $new_model->user_info(); $team_selection = $user_info_select['team']; I am stumped as to why I can echo $team_selection with no problem, yet when I insert it as a parameter in the function, check_invalid_lineup() it fails to work! Have been puzzling over this for a good few days, shifting code and having no success. Any ideas?
  5. Hi there - thanks in anticipation of any help you may offer!!! I am using the following function, to generate a round robin tournament: function round_robin($teams){ if (count($teams)%2 != 0){ array_push($teams,"Bye"); } $away = array_splice($teams,(count($teams)/2)); $home = $teams; for ($i=0; $i < count($home)+count($away)-1; $i++){ for ($j=0; $j<count($home); $j++){ $round[$i][$j]['Home']=$home[$j]; $round[$i][$j]['Away']=$away[$j]; } if(count($home)+count($away)-1 > 2){ array_unshift($away,array_shift(array_splice($home,1,1))); array_push($home,array_pop($away)); } } return $round; } This produces a round robin tournament, but this does not outcome in evenly distributed data. For example if you insert an array of values 'Team 1', 'Team 2', 'Team 3', 'Team 4', 'Team 5', 'Team 6', it revolves the other teams around 'Team 1' meaning, 'Team 1' gets 6x Home games. I added bit of code to even it up. $unformatted_matches = round_robin($teams_entered); foreach ($unformatted_matches as $key => $value) { if($key % 2 !== 1) { $reversed = array_reverse($value[0]); array_values($reversed); $unformatted_matches[$key][0] = $reversed; } } However the produces a schedule such as shown at this link: https://docs.google.com/spreadsheet/ccc?key=0AvUWywpDuSKudFZId1NUSGltVll6dlVKanluQjhGWmc&usp=sharing where all but 'Team 1' face consecutive matches away or at home!! I hope you are still following at this point! What I would like to achieve, is to make the matches distributed evenly, so each team would play Home Away Home Away etc!! It would be great to get some help here. Thanks Zugz
  6. I found my answer!! function sort_array($array, $orderArray) { $ordered = array(); foreach($orderArray as $key => $value) { if(array_key_exists($key,$array)) { $ordered[$key] = $array[$key]; unset($array[$key]); } } return $ordered + $array; } Thanks for reading anyhow.
  7. No, it is not directly from a query. I have already had to play around with the data to get the format above.. I think usort is the way to go, but I am trying to work out how to use usort!! Thanks for replying anyway. Zugz
  8. Hi there all, Thank you for your suggestions and help in anticipation of your help!! I have 2x arrays. The first is an array of the totals for each round. The second is an array split into weeks (the weeks being the first level keys. I would like to arrange all of the second subarray team names, in order of the teamnames of the first array. so in order of [team3], [team5], [team1], [team2] and [team4].. I hope you follow what I mean.. Here are the first and second arrays!! First array (Total of rounds) Array ( [Team3] => Array ( [brd_points] => 14 [ttl_points] => 5 [games] => 3 ) [Team5] => Array ( [brd_points] => 12 [ttl_points] => 3 [games] => 2 ) [Team1] => Array ( [brd_points] => 7 [ttl_points] => 3 [games] => 2 ) [Team2] => Array ( [brd_points] => 16 [ttl_points] => 1 [games] => 3 ) [Team4] => Array ( [brd_points] => 7 [ttl_points] => 0 [games] => 2 ) )1 // Second array - individual rounds. Array ( [1] => Array ( [Team3] => Array ( [brd_points] => 4 [ttl_points] => 2 ) [Team2] => Array ( [brd_points] => 6 [ttl_points] => 0 ) [Team4] => Array ( [brd_points] => 6 [ttl_points] => 0 ) [Team1] => Array ( [brd_points] => 2 [ttl_points] => 2 ) [Team5] => Array ( [brd_points] => Bye [ttl_points] => Bye ) ) [2] => Array ( [Team3] => Array ( [brd_points] => 5 [ttl_points] => 2 ) [Team4] => Array ( [brd_points] => 1 [ttl_points] => 0 ) [Team5] => Array ( [brd_points] => 7 [ttl_points] => 2 ) [Team2] => Array ( [brd_points] => 5 [ttl_points] => 0 ) [Team1] => Array ( [brd_points] => Bye [ttl_points] => Bye ) ) [3] => Array ( [Team2] => Array ( [brd_points] => 5 [ttl_points] => 1 ) [Team3] => Array ( [brd_points] => 5 [ttl_points] => 1 ) [Team5] => Array ( [brd_points] => 5 [ttl_points] => 1 ) [Team1] => Array ( [brd_points] => 5 [ttl_points] => 1 ) [Team4] => Array ( [brd_points] => Bye [ttl_points] => Bye ) ) ) 1 Again thanks for your help!!
  9. Figured it out!! (Missed 2x parameters). foreach ($totals as $key => $row) { $ttl_points_check[$key] = $row['ttl_points']; $brd_points_check[$key] = $row['brd_points']; } array_multisort( $ttl_points_check, SORT_DESC, $brd_points_check, SORT_DESC, $totals);
  10. Hi all, I sorted this array: array ( 'team4' => array ( 'brd_points' => 16, 'ttl_points' => 1, ), 'team1' => array ( 'brd_points' => 14, 'ttl_points' => 5, ), 'team3' => array ( 'brd_points' => 12, 'ttl_points' => 3, ), 'team2' => array ( 'brd_points' => 7, 'ttl_points' => 3, ), 'team5' => array ( 'brd_points' => 7, 'ttl_points' => 0, ), ) Into this array: array ( 'team1' => array ( 'brd_points' => 14, 'ttl_points' => 5, ), 'team2' => array ( 'brd_points' => 7, 'ttl_points' => 3, ), 'team3' => array ( 'brd_points' => 12, 'ttl_points' => 3, ), 'team4' => array ( 'brd_points' => 16, 'ttl_points' => 1, ), 'team5' => array ( 'brd_points' => 7, 'ttl_points' => 0, ), ), By using this code with array_multisort() foreach ($totals as $key => $row) { $ttl_points_check[$key] = $row['ttl_points']; } array_multisort( $ttl_points_check, SORT_DESC, $totals); That works fine, but what if I firstly want to sort by 'ttl_points', and then by 'brd_points'.. In the case above, team3, should be above team 2!! Thanks for reading and replying!
  11. Thanks for your posts.. That really helped me, ta. Jeff Morris
  12. Hi all, I have this array: Array ( [3] => Array ( [Team1] => Array ( [brd_points] => 5 [ttl_points] => 1 ) [Team2] => Array ( [brd_points] => 5 [ttl_points] => 1 ) [Team3] => Array ( [brd_points] => 5 [ttl_points] => 1 ) [Team4] => Array ( [brd_points] => 5 [ttl_points] => 1 ) ) [2] => Array ( [Team2] => Array ( [brd_points] => 5 [ttl_points] => 2 ) [Team5] => Array ( [brd_points] => 1 [ttl_points] => 0 ) [Team3] => Array ( [brd_points] => 7 [ttl_points] => 2 ) [Team1] => Array ( [brd_points] => 5 [ttl_points] => 0 ) ) [1] => Array ( [Team2] => Array ( [brd_points] => 4 [ttl_points] => 2 ) [Team1] => Array ( [brd_points] => 6 [ttl_points] => 0 ) [Team5] => Array ( [brd_points] => 6 [ttl_points] => 0 ) [Team4] => Array ( [brd_points] => 2 [ttl_points] => 2 ) ) ) 1 I would like to get an array of the sum of all the [brd_points] and [ttl_points] for each team.. so... it would become.. Array ( [Team1] => Array ( [brd_points] => 16 // 5 + 5 + 16 [ttl_points] => 1 // 1 + 0 + 0 ) [Team2] => Array ( [brd_points] => ?? [ttl_points] => ?? ) etc...
  13. You were right on: Thank you for taking the time to post. You have helped me out a lot. Zugz
  14. I have overwritten the whole forum with a fresh install.. Still no joy. Database problem do you think?
  15. It is the inbuilt phpbb function. I will overwrite the phpbb with new files I guess, to see if that eliminates that avenue.
  16. I made another simple query, to the and it again failed to collect the data. I think there must be something wrong with the phpbb query execution itself, else something wrong with the database. There are no php errors thrown up!!
  17. This query executes fine in phpmyadmin, but only gets one row when php executes the query. I am unsure of what to do to fix this. Please would you give me suggestions as to what the error maybe, and how to go about fixing it. $sql = "SELECT the_forum_league_games.id, the_forum_league_pairings.weekno, users1.username AS user1name, users1.user_id AS user1id, users2.username AS user2name, users2.user_id AS user2id, the_forum_league_games.result FROM the_forum_league_games LEFT JOIN the_forum_users AS users1 ON users1.user_id=the_forum_league_games.player1 LEFT JOIN the_forum_users AS users2 ON users2.user_id=the_forum_league_games.player2 LEFT JOIN the_forum_league_pairings ON the_forum_league_pairings.id=the_forum_league_games.pairing_id WHERE the_forum_league_pairings.seasonid='$season_number' ORDER BY the_forum_league_pairings.weekno, the_forum_league_games.player1"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { echo print_r($row, false); // outputs one row, whereas in phpmyadmin 12 rows!! $weekno_arr[] = $row['weekno']; $player1_arr[] = $row['user1id']; $player1_arr[] = $row['user2id']; $username1_arr[] = $row['user1name']; $username2_arr[] = $row['user2name']; $gameid_arr[] = $row['id']; }
  18. Thanks Josh.. that is a nice and easy solution.
  19. I have a php array called $username_arr, of usernames. Some contain spaces. I would like to search another array, called $event_name, for the usernames contained in $username_arr. For example, "at 20.00, Steve Dobson went to the park". If "Steve Dobson" in the array $username_arr, I want to know!!! This is what I have got so far, although I have taken it out of the for loop as you can see. if (preg_match('/^['.$username_arr[$i].']$/', $event_name[$j])) { // execute command } How should I go about doing this?
  20. I have copy and pasted the code, from this webpage... editing only the name of a file... http://www.phpbb.com/kb/article/add-a-new-custom-page-to-phpbb and it gives me a blank page, even after inserting the sample data, in the 'schedule.html'. I'm suprised to be halted from progress at the first hurdle. Would anyone be able to help? <?php define('IN_PHPBB', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); // Start session management $user->session_begin(); $auth->acl($user->data); $user->setup(); page_header('Schedule Page'); $template->set_filenames(array( 'body' => 'schedule.html', )); make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx")); page_footer(); ?>
  21. hello, i am transferring the post number from a forum page, to a non-forum page via url variables.. how do i stop someone editing the url variable and viewing the posts concerned? i thought i could possibly use cookies/or a kind of auto-post form.. please help if you can.. just what to google would be appreciated
  22. Hi, I'm having problems with my phpbb forum/facebook coding. I have recently put Facebook Share links in my forum... The facebook 'Share' links(buttons), are attached to every post viewable within th eforum, and link to: http://www.facebook.com/sharer.php?u=http://www.mywebsite.com/facebook/share-fb.php?postNo=" . $postrow[$i]['post_id'].'&title='.$userdata['username'].'%20on%20facebook!!' --> where '$userdata['username']' username of forum user ..and '$postrow[$i]['post_id']' = the id of the forum post, to be processed by share-fb.php So as according to here: http://developers.facebook.com/docs/share under the Basics section, I will be able to control the thumbnail, title and content from So the url looks like this: http://www.anclchess.net/facebook/share.php?postNo=65914&title=My%20Names%20on%20facebook!!Title%20of%20post There are 2 major problems. 1) I am passing the post number identity via URL.. which means anyone wanting to view posts they may not have permissions to view, would simply need to change the share.php?postNo=65914&title= and they would have access.. and 2) The the thumbnail, title and content don't seem to work.. I cant figure out why.. see below This is 'share-fb.php': <?php define('IN_PHPBB', true); // allows infomation to be passed to external page, such as '$userdata['username'] '(username) $phpbb_root_path = '../forum/'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.'.$phpEx); // // Start session management // $userdata = session_pagestart($user_ip, PAGE_INDEX); init_userprefs($userdata); // // End session management // ?> <?php $postIdent = $_GET['postNo']; // gets forum post identity from URL, to then later query.. \\ $titleIdent = $_GET['title']; // gets title of post from URL too \\ if($userdata['session_logged_in']) { //echo'Hello ' . $userdata['username'] . '. The facebook system is not yet up-and-running. Please try later.<br>'; // <-works \\ $sql = "SELECT post_id, post_subject, post_text FROM phpbb_posts_text WHERE post_id='$postIdent'"; if( !($result = $db->sql_query($sql)) ) { message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql); } while ( $row = $db->sql_fetchrow($result) ) // executes database query \\ { $postSubject = $row['post_subject']; $postText = $row['post_text']; } $pattern = '#\[[^\]]+\]#'; $postTextFormat = preg_replace($pattern, '', $postText); // this search and replaces the forum square brackets code such as: '[ url ]' & '[ /url ]' content ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> // left empty \\ <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"> </script> <meta name="title" content="<?php echo echo $titleIdent; ?>" /> // this doesnt work - I don't know why. The variables work in the <body> but not here \\ <meta name="description" content="<?php echo $postSubject.$postTextFormat; ?>" /> <link rel="image_src" href="http://www.mywebsite.com/images/website_log.png" /> </head> <body> <?php echo $postSubject.'<br>'.$postTextFormat; // contains content of forum post \\ ?> </body> </html> <?php } else { echo('You are a forum guest. Please sign in or register.'); } ?> Please help if you can.
  23. I tried using 'filter_has_var(INPUT_POST, 'postNo');' .. but that didn't work...
  24. Hello people. I have a phpbb forum, and I have added a facebook link to every topic within my forum. That was relatively simple. What I want to do now, is send information from the 'viewtopic.php' page -> an external page called share.php. The facebook buttons I have inserted go to 'share.php?postNo=621' (621 is an example)... in that case the post with the identity 621 is recalled.. however I need to prevent people from simply editing the URL to view/submit to facebook, posts which they are not entitled to view.. I have used this bit of code to hide display the facebook buttons.. if ($userdata['session_logged_in'] && $is_auth['auth_edit']) { //exectute button code... $temp_url = append_sid("../facebook/share.$phpEx?postNo=" . $postrow[$i]['post_id']); $sharefb_img = '<a href="' . $temp_url . '"><img src="templates/subSilver/images/lang_english/icon_fbshare.gif" alt="' . $lang['Share_with_facebook'] . '" title="' . $lang['Share_with_facebook'] . '" border="0" /></a>'; $quote = '<a href="' . $temp_url . '">' . $lang['Share_with_facebook'] . '</a>'; } That works fine. As you can see, the post number ($postrow[$i]['post_id']) is passed via URL to the next page.. However how do I prevent people from simply editing the 'postNo=' variable to view posts which they may not have permission to view. I hope you follow me!! Thank you in advance on anticipation of your help!!
  25. Well, I'll let you big boys fight it out then I put it in the root directory, not because I felt one of you is right - but because thats what I was told to do first. Thanks for all your comments
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.