Jump to content

dannyluked

Members
  • Posts

    95
  • Joined

  • Last visited

    Never

Everything posted by dannyluked

  1. I will look be able to reply to any help tommorow at about 17:00 British time. (latest)
  2. Hi, I am making a forum and struggling to sum up posts. I already have a code that perfectley shows Categorys and forums. What It displays is; Cat - 1 Forum -1 Forum - 2 I want it to display this; Cat - 1 Forum -1 ----- 3 Posts Forum - 2 ----- 8 Posts I want the code that shows the forums to add up the column replycount in the table topics where forumid is the same as the forums ID (so topics.forumid = forums.id). If you need any more info please ask, thanks PS. This is were I want to put it... http://dannyluked.comze.com/forum
  3. Ill start by saying I LOVE the way the image enlargens in the way it does!! I think the links at the bottom should have a light grey background to make it look more clear but I do like the rest of the site, suits it audience well.
  4. Love the site, looks proffesional. I agree with the footer things, needs replacing and I would make the bottom margin bigger on the middle section e.g. Pay pal intergration, Baby website software... The blue links look like they may link to other dodgy websites (like ones that sell you fake things if you know what I mean). Other than that its great. Very clear and easy to use. PS. I'm viewing in firefox at 1280x800
  5. Thought it was an easy way to link to firefox...
  6. Thanks for the replies. I have stoped people injecting html and got rid of the flash calendar. I am now going to lighten images as they slow the site.
  7. Worked perfectley first time! Thanks for the easy answer and fully working code.
  8. <?php include "left.php" ?> PS. What is quicker? loading left.html or left.php
  9. If im understanding you right... You could use cookies for setting whick box is selected or use something like; ?1=selected&2=selected... 1 being the checkbox and selected being the option...
  10. Ahhh, How do you stop an endless loop (use you example)
  11. Thanks for the reply, Im not sure what an endless look is and how would you stop an endless loop? PS. I made a quick header which just had a word in it, that still slowed the site down.
  12. Hi, I have recently been using the include statement to include my side, nav and header. When I use it my site seems to slow down. I also have more proof of this as I have installed Wamp (a virtual server) to test my PHP and when including just a simple header the page slows down noticeably. I was just wondering if there is a way to speed it up or an alternate method to 'include' parts of my pages (eg header)? Thanks
  13. Thanks, Ill try this tommorow - Thats me done for tonight!
  14. This is what I have; <?php include "config.php"; mysql_connect($server, $db_user, $db_pass) or die(mysql_error()); mysql_select_db($database) or die(mysql_error()); $result = mysql_query("SELECT c.*, f.* FROM forum f, cat c WHERE f.catid = c.id ORDER BY c.name, f.forumname") or die(mysql_error()); $row = mysql_fetch_array( $result ); while($qry = mysql_fetch_array($result)){ echo "<b>$qry[name]</b><br />"; echo "-$qry[forumname]-<br> <br> "; } ?>
  15. Same again, only 1 forum under each cat
  16. That works however it only shows one forum.forumname under each cat.name. Thanks
  17. Hi, I have two tables; Cat id | name | 1 | Cat 1 | 2 | Cat 2 | 3 | Cat 3 | Forum id | forumname | catid | 1 | forum 1 | 1 2 | forum 2 | 1 3 | forum 3 | 2 I am trying to get the output; Cat 1 Forum 1 Forum 2 Cat 2 Forum 3 (notice there is no Cat 3 as there are no forums for that category) I cannot get any sort of query to work (im a newbie)! All I really want to do is match up two rows but im finding it hard. Thanks
  18. Thanks guys! The main reason it is so badly coded is that I made the basic HTML in good code a while ago. Since then Ive started learning PHP so codes have been messed with! I am going to finish the forum and then try to tidy it up. PS. Does anyone know why including header/navigation is slowing down my site and what is the best way to do it, Thanks
  19. Hi, I have been running this website for about six months now. It has no purpose yet apart form helping me practise my PHP coding skills! It is hosted from a free hosting company and I'd just like a few people to take a look and tell me how I could make any improvements http://dannyluked.comze.com PS. I only really use the site to create PHP stuff so I've not yet moved onto more complicated CSS stuff (planning that soon)
  20. Just one question! How do I make it go to $thesite/FOLDER
  21. Hi, I have this code; <?php if(!$_POST[id]){ header('Location: HTTP://EXAMPLE.COM');exit; }else{ } ?> The code works fine! I was just wondering how I can change the 'http://example.com' to a variable that is in a seperate file (config.php)? I am guessing it is something like this although this code dosent work! <?php include "config.php"; if(!$_POST[id]){ header('Location: $thesite');exit; }else{ } ?>
  22. I forgot to say, This is what the current code does: if user isnt logged in they can see forums where forumlevel is less than 3. (PERFECT) But if user is logged in they can see all forums. (They should only be able to see forums Where forumlevel = userlevel or more)
  23. Hi, I have a code (below). It dosent do what I want it to do! I want the code to show the following: if forumlevel = more than 3 and there is no session called loggedin, echo "Not allowes", exit; if forumlevel = more than 3 and there is a session called loggedin check if the userlevel = the forumlevel or more. If so echo "". If not echo "You cannot view", exit; if forumlevel = 3 or less echo "". <?php include "config.php"; mysql_connect($server, $db_user, $db_pass) or die(mysql_error()); mysql_select_db($database) or die(mysql_error()); $forlev = mysql_query("SELECT forumlevel FROM forum WHERE id = '".$_GET['id']."'") or die(mysql_error()); $qry = mysql_fetch_array($forlev); $forumlevel = $qry[forumlevel]; if (isset($_SESSION['loggedin'])){ $uselev = mysql_query("SELECT userlevel FROM ac_users WHERE username = '".$_SESSION['loggedin']."'") or die(mysql_error()); $qry2 = mysql_fetch_array($uselev); $userlevel = $qry2['userlevel']; }elseif(isset($_SESSION['loggedin']) and $userlevel > 3){ echo ""; }elseif(!isset($_SESSION['loggedin']) and $forumlevel > 3){ echo "Not allowed"; exit; } ?> Does anyone know where I have gone wrong?
×
×
  • 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.