Jump to content

Anders Moen

Members
  • Posts

    866
  • Joined

  • Last visited

Everything posted by Anders Moen

  1. Okay, sorry then...probably tired.But this code will work with how I've set up my forum tables? SELECT c.id AS par_id, c.category AS par_name, s.id AS sub_id, s.sub_cat_name AS sub_name FROM categories AS c INNER JOIN subcategories AS s ON s.parent_id = c.id ORDER BY par_name, sub_name
  2. Oh yeah, but I hate gimp...we use it at school, but believe it or not but I make better things in Paint than gimp :)But that's just my opinion about it...Vytas: it's worth a try if you haven't got the image yet.
  3. I'm not sure what you're talking about except Piczo, but if Piczo hadn't exist I wouldn't be doing HTML and other programming. That's where I started with some basic HTML and then went on to freewebs.com and learned more and more and now I'm on server-side languages and C++ so Piczo can be good even though the safety there is really low...But the online/offline thing she has...she might update that on her own when she's on? I didn't see it so..OMG! That was annoying! Can't even click on the page without getting a JS alert box! Hate those kinda pages...and is she learning HTML to others? Start with something else than Piczo if you're actually gonna learn someone else anything
  4. And if you don't know if it's htdocs, public_html or whatever, just ask your host
  5. Huh?! Now you confused me ... that "code" I sent was just to simply see how my tables look like...not the actual code :)And it's text by the way, not varchar..I just use text all the time lol
  6. Hm, okay...Table: categories `id` auto_increment primary key`category` text Table: subcategories `id` auto_increment primary key`cat_name` text // this is the category name (maybe id?) it belongs to`sub_cat_name` text // this is the sub category name This helps you?
  7. Hm, okay...and the differences are what? I don't see a point with it, but I guess there is.
  8. Hm, okay...I still don't know how to do it.Yeah, I know they don't cause I deleted the script I used before from the computer (don't know why) and then I had to find the code back and then I started to edit it but then I couldn't be bothered to do it when I was in the middle of it...lol
  9. Well...you can make a link <a href="some-site.php">Some site</a> and then you create a site in your FTP program called some-site.php (if you have PHP enabled, if not use .html or .htm).In some-site.php you just copy the whole source code from index.php and then you change the content you want to change.Oh yeah, about tables...tables are for tabular data, and div's (with CSS of course) is for design
  10. Hey guys and maybe girls!I'm working on a forum now and then, but I want to know how I can form the categories with the subcategories under...I mean, I managed to make it like this but I coudn't make it work with several subcategories under =/How do I do that? The code I used to form it the first way was with this:<?php// Make a MySQL Connection// Construct our join query$query = "SELECT categories.id, subcategories.id ". "FROM family LEFT JOIN food ". "ON family.id = food.id"; $result = mysql_query($query) or die(mysql_error());// Print out the contents of each row into a table while($row = mysql_fetch_array($result)){ echo $row['Position']. " - ". $row['Meal']; echo "<br />";}?> Actually I don't remember this script how I made it work almost like I wanted it too, but that's the script I worked out. From here for those of you who want to know about some more tutorialsEdit: I wrote INNER JOIN in the topic title, but I meant LEFT JOIN
  11. What do you mean?By the way, don't use tables for design (I'm from Norway too. Lillehammer)Welcome to the forum
  12. http://tutorialized.com - they have about ... a lot of pages with Flash tutorials. From games to websites
  13. Anders Moen

    smiley

    Lol, okay.. That's good :)I presume you found out that you can put it anywhere, hehe. It's best to include it, because if you need to change or add a smiley, you don't need to go to all pages hehe...oh well, I think you know that already
  14. Scemsin, there aren't a link there =/
  15. Anders Moen

    smiley

    You can use bbCodes <?phpfunction someName($text) {$text = str_replace(':)', '<img src="img_smile.jpg" alt="" />', $text);$text = str_replace(':D', '<img src="img_bigsmile.jpg" alt="" />', $text);$text = str_replace(':(', '<img src="img_sad.jpg" alt="" />', $text);return $text;}?> You get it? You do something like that :)Add this line to each new smiley: $text = str_replace(' in here you write in example :) ', ' and here you continue with the img code', $text);=:) replaced with <img src="url to image" alt="" /> If you're relative new with functions and stuff, in the while loop, you write: echo someName($row['content']);
  16. No problem :)Glad I could help.
  17. <!-- Copyright 2005 Bontrager Connection, LLC//// Two places need to be customized.////// Place 1:// Between the quotation marks, specify the name of// your form.The script here This is from the JS file and that can't be right can it? =/I don't think you're gonna use <!-- in a .js file...but if you use <script type="text/javascript"><!-- Script --></script> it might be right.Just so you know, I'm not excactly a racer in JavaScript
  18. Make your site look good in Opera and FireFox, then IE because IE always comes with one or more problem which you can solve with this code: <!--[if IE]>The Style Sheet For IE<![endif]--> I use that code on several of my sites, because IE is not a good browser and MS still haven't gotten it unfortunely.
  19. Okay, thank you :)I will look myself too
  20. If you need an FTP program, I found a website with a little list over some FTP programs: http://www.thefreesite.com/Free_Software/FTP_freeware/
  21. Thanks. I agree with the new design being better than the old one, but that's because I like continued on it. What? :S Thanks. That's where I'm learning some Flash and PS from too
  22. Hm, okay...I'm not sure what you mean then. Could you explain better please? Hehe
  23. Hello.For the first, this is not W3C. This is W3S. W3C is here I think.What you mean is that you want to make a search engine so you can search through a table in your database? I made a search engine not too long ago that works just fine. I'll post the code here. <form action="" method="get"><input type="text" name="check" value="<?php echo "" . $_GET['check'] . ""; ?>" size="20" /><input type="submit" name="submit" value=" Search " /></form><?php$con = mysql_connect("localhost", "username", "password");if (!$con) {die('Could not connect ' . mysql_error());}mysql_select_db("db_name", $con);if (isset($_GET[submit])) {$check = mysql_real_escape_string($_GET['check']); // You might not need the mysql_real_escape_string here, but I just put it on;)if (empty($check)) {die('You need to fill in at least one letter!');}echo "You searched for: {$check} <br />";echo "<br />";echo "<br />";echo "<b>You got";$result = mysql_query("SELECT * FROM table_name WHERE title LIKE '%$check%'");echo " " . mysql_num_rows($result) . " result(s).</b>";echo "<br /><br />";while ($row = mysql_fetch_array($result)) {echo "<a href=\"news.php?id=" . $row['id'] . "\">";echo stripslashes($row['title']);echo "</a>";echo "<br />";}}?> This is taken directly from the site where I have the search engine. So just change what you need to change
  24. Are you able to use PHP? Then this code works. I've tried it on localhost <?phpif (isset($_POST['submit']) AND ($_POST['fi'] == 10)) {echo 'Congratulations! You answered "10" which is completly right!';}else if (isset($_POST['submit'])) {echo 'Ehh...don\'t you even know what 5+5 is? I really think you are a dumb person! Haha!';}?><form method="post" action=""><p>What is 5+5?</p><input type="radio" name="fi" value="4">4<br><input type="radio" name="fi" value="10">10<br><input type="radio" name="fi" value="12">12<br><input type="submit" name="submit" value="Check!"></form> Oh by the way, I might have misunderstood this totally though, but hopefully this is what you meant
  25. I'm mostly using the codes from W3Schools, except one, that I built myself. The pagination script I mean, if you know what it is...if not, Google it :)Yeah, I guess I could...I'm just gonna get done with it and stuff. But I'm working on my CMS more so I don't really work much on the forum these days.Just read at W3Schools Thanks for the links :)But I can't really find good-tutorials any good..lol
×
×
  • Create New...