Jump to content
xisto Community

bjrn

Members
  • Content Count

    380
  • Joined

  • Last visited

Everything posted by bjrn

  1. Perhaps if you tried this: mysql_connect ("localhost", "xxxx", "xxxxx") or die ('I cannot connect to the database because: ' . mysql_error());mysql_select_db ('blog) or die ('I cannot select the database because: ' . mysql_error());$query=mysql_query("SELECT name,url,msg,id FROM shout ORDER BY id DESC",$db) or die (mysql_error());while($row=mysql_fetch_row($query)){echo "Name: ".$row[0];} Things you might want to check: I'm sure you've checked yourself, but I still have to ask: Are you completely sure that there is data in the shout table? That you aren't using mysql_fetch_row() and then $row['name']. I think when you fetch results with the row function, you can only use numbers, if you want to use names like: $row['name'], $row['url'] etc, you have to use mysql_fetch_array($query) instead. That's all I can think of right now.
  2. Yes, I know. I posted a link to Bar code mill which lets you do exactly that. You get to choose the text and the encoding you want so you get a real working bar code.
  3. Actually, most bar code reading systems read one type of encoding. That means if you make a Code 128 bar code, you will probably be able to read it under most scanners. That is bar codes are actually strings of text. A certain pattern of bars hold a certain value, like "k32h4lkj3" or "HELLO".So instead of you putting a product into the system by scanning a bar code and "telling" the system what it is supposed to be, the system actually gets a string of characters from the scanned code. (on top of that I guess many systems let you you change the text displayed for usability reasons).
  4. If you can't open the site it's not because of your firewall, it's because of your connection or something like that. But I can tell you that the windows firewall does okay on the Shields Up! test (i think), but miserably fails the LeakTest.
  5. Yeah neat thing. Just a few comments about "real" bar codes and such. As has been pointed out, this is just noise made to look like a bar code, and wouldn't be recognised by any reader. If you want a real, working bar code you could visit Scott Blake's Bar Code Art, he explains how bar codes work. I could have sworn there was a page where you could type in a few characters and it would generate a Code 128 bar code from it, but I can't find it on the site anymore. Luckily I found another site that did it: Bar code mill, which lets you type a few characters and choose the encoding.
  6. Uhm, what good would that script be? It makes a div which is somewhat smaller than the screen it is viewed in. And depending on the contents of the div you might get a clipped or crunched image inside it...
  7. Make sure the PHP scripts are connecting to the DB and selecting the DB okay. Try to do something like $username = 'something';$password = 'something';$dbname= 'something';mysql_connect ("localhost", $username, $password) or die ('ERROR: I cannot connect to the database because: ' . mysql_error());mysql_select_db ($dbname) or die ('ERROR: I cannot select the database because: ' . mysql_error()); And die() messages further along the way as well.
  8. The script is (probably) made with a linux server in mind. He mentions that the script runs as a cron job, and I guess that is one of the better ways to run it. Basically what you need is a computer with internet access and Python installed, and a MySQL database somewhere. Once you have that, you can start up the script yourself every now and again, or try to find some solution that does it for you (like cron on linux).
  9. You can manage with just one, and just make sure all your tables have different names. You could for example add a few characters in front of each table name to show which "group" it belongs to. So you might have dev_table1dev_table2forum_table1forum_table2 and so onIn fact phpBB by default prefixes all its tables with a few characters so it doesn't clash with any existsing tables you may have.Something that _is_ important is the amount of space you get for your database(s). Some hosts have space for the databases independent from the rest of your hosting space. Make you that you have enough space for storage.Other than that, multiple databses is a convenience, and a bit of a security measure (both with regards to password and so on, but also data-corruption). But as I said, you will probably manage with just one.
  10. Light in almost all circumstances. A dark menu bar is often not bad at all, but overall a lighter layout usually looks better, in my opinion.I never really got the black and red or dark blue layouts.
  11. If you want to scan your own ports, there is the quite well known Shields Up! (I think the URL is supposed to look that way) tester. It's an old one, but still good. From the same site you can also try LeakTest, a little app you can download which will attempt to sneak data through your firewall. LeakTest is also quite old, and I think there are better leak testers out there, but I am afraid I can't remember the names.
  12. no9t9, I'll have to go with Thyssen here. The standards are there to be, that's right, standards. When I say I want a block level element with a one pixel black border, I want all capable browsers to display that, and not two pixel red dotted borders instead. The difference you might get between Firefox and Opera are not intentional differences, they are essentially bugs which (hopefully) will be fixed.To me, the advantage of designing for Firefox is that you can do all sorts of neat stuff which you can't do with IE. So basically, make a nice looking site, and then check that it looks okay in IE. Not much extra work for a nicer site.And I have to comment on your "who would want to pay extra for stanards compliant pages" thing. You seem to assume that everyone is making pages for IE, and that making them work in other browsers is loads and loads of work. It isn't. If you can only make websites that work in IE and only with much difficulty can get them working in Firefox and Opera, you shouldn't be a webdesigner/developer in the first place.Of course, there are people who take it all too far. Testing in IE6, Firefox and Opera should be okay. Anyone sane happily ignores IE5Mac and such abominations.
  13. Yep, Firefox can be really slow. If you want a browser that doesn't take as much memory, but still displays pages just like Firefox would, get K-Meleon. It hasn't got all the extras and things Firefox has, but it takes only a fraction of the memory Firefox would take. Firefox really isn't sleeker than IE from a user point of view. From the user's point, Firefox is bloated and takes up incredible amounts of resources compared to IE. This is mainly because of two things (as far as I've understood): IE is integrated into Windows, so much of what IE uses is already loaded as soon as you start Windows, but secondly (and here the Mozilla people can change things, if you wanted things optimized) Firefox uses it's own functions when it could use native routines instead, which makes it slower.
  14. Nope. IE would have to become about 10 times better than anything out there to limit complaints. As long as it's not the best there is, people will complain. And at the moment you can't blame anyone for doing so, IE is really outdated, and there are a few good alternatives (like Firefox and Opera). I still think it's a bit of a shame that there aren't more browsers, I like diversity. A port to windows of the KHTML rendering engine for instance, and perhaps Amaya in a not too distant future would be nice to see.
  15. You guys have gotten it all wrong. Everyone know google really uses Pigeon rank! While they have people trying to come up with new stuff all the time, the main thing behind your search result remain the pigeons!
  16. As no9t9 pointed out, it all depends on what you want to do. If you are planning on becoming a web developer, you'll need to know server-side scripting, and I guess knowing SOAP and such can be handy in case you are going to build web services.In general though I'd say you should learn different types of languages. Learn some C and C++, because they are always handy to know. But I suggest you also try your hand at Prolog or similar, since it works completely different from procedural or OO programming.And for the love something, please learn to write clean, readable and maintainable code.
  17. I think there are already a number of mobile phones with mp3 playing capabilities. I know at least Motorola and Samsung have realy mp3 playing things (not just mp3s as ringtones), and it wouldn't surprise me if Nokia and Ericsson have models out that can do it.
  18. What Thyssen said. The pages aren't broken with Firefox, they're just broken, period.If I were you I'd try to make my page work in Firefox and Opera, and chances are that it will work for IE as well. And if it doesn't you can fix it. The point is that (in my experience) it is ofent easier to work with validating pages than just pages that happen to work in IE.Just my two cents.
  19. So... what kind of degree are you getting? There's quite a difference in what you can do between having a Bachelor's degree in liberal arts and a Master's in Computer Science (just to name something).If you have a master's you might try getting a Ph.D. position in a university abroad, since you don't seem to be too happy about Nigeria. Actually, no matter what kind of degree you have you might try moving to some other country. I have no idea how hard it is, but it might be an option.
  20. You can make your own checking function to strip strange characters and quotation marks, but you might as well use the excellent PEAR DB functions for just that issue. And Xisto has PEAR installed, so you don't have to worry about that either. Just use the prepare() and execute() functions like so: <things you want to do here> require_once("PEAR.php"); require_once("DB.php"); PEAR::setErrorHandling(PEAR_ERROR_DIE, "Aaaaargh! Error: %s"); $conn = DB::connect("mysql://username:password@localhost/databasename"); $preparedstatement = $conn->prepare('INSERT INTO tablename (field1, field2, field3, field4) VALUES (?, ?, ?, ?)'); $data = array($variable1, $variable2, $variable3, $variable4); $conn->execute($preparedstatement, $data);} You will obviously have to change usernames/passwords/db name and set the variables and change table and field names to whatever you are using. And if it's a guestbook or forum like thing you might want to do something like: $variable=htmlspecialchars($_POST['variable'], ENT_QUOTES);to set HTML entitys. PEAR is a bunch of PHP packages with all sorts of handy functions. You can get more info about PEAR at pear.php.net and more about the PEAR DB package and how to use it here.
  21. Background images are just like normal images in HTML documents, you can't set them to resize to whatever the user has. You could use some PHP GD functions with some browser sniffing to resize the image before sending it to the client. What you'd have to do is this: When the user comes to your page, check what resolution they are using. Have a PHP function that resizes your background image to the resolution Set the generated image as background image Send all data to the user. I am assuming you have some high-resolution image that scales down very well, because most resizing doesn't work very well when there are big changes. I am also assuming your background image doesn't work when you put the image side-to-side, repeating both left-to-right and up-to-down, if that works all you have to do is add body {background-image: url(your-background.image);background-repeat: repeat;}
  22. And then of course someone might just want to make a RPG without having to learn to code, or gather a big coding team. There are enough games being made who's aren't made to corner a market, or to make loads of money, or to be distributed among a small group of friends. And, as you pointed out, it gives some experience, and an introduction to game making, if you are planning on continuing making games...
  23. Seriously, that post made hardly any sense at all.Basically you seem to be saying that no one is contributing to Mozilla/Firefox because they don't get any money. You're wrong.Then you say that if you have to pay for something it has to be better than the free thing. Which really isn't an issue with Firefox vs. IE, because neither of them cost any money.
  24. There was a great television series made by the BBC called Cold Lazarus (directed and written (I think both) by Dennis Potter (who also made The Singing Detective)). Basically it's sometime in the future and a company has managed to keep the head or a person alive and are using his brain and watching all his memories. It's quite scary in the way that you really don't want anything like that happening to you.
  25. Heym that's really neat. I had no idea you could extract files on the server. And if there's anything annoying about ftp-ing, it's having to upload loads and loads of file you've just extracted.Thanks for the tip wlite!
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.