Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. [quote author=neylitalo link=topic=109478.msg449058#msg449058 date=1160357254] ... I can't run Kmail without KDE ... [/quote] Yeah you can, well Gnome can at least run KDE's applications, I don't know about xfce.
  2. Would I achieve any visible quality improvement by using a DVI cable instead of the VGA cable I currently have for my monitor?
  3. Daniel0

    RSS link help

    [quote]404 Error -- File Not Found[/qote]
  4. Have a permissions table or if it is permissions like "Is administrator?" then have fields in the group table for it.
  5. Something like this should solve your problem. [code]<?php $old = "the old hash would in some way be stored in this variable"; if(md5_file("http://example.com/the_file.tar.gz") === $old) { echo "A new version has been released"; } else { echo "No updates are available"; } ?>[/code]
  6. In this case I would actually use this: [code] <form method='get'> <select name="cats" onChange="form.submit()"> <!-- not sure about this. I can't remember how to submit forms using javascript --> <option value="">Any</option> <option value="1">1</option> <option value="2">2</option> </select> <button type='submit'>Go</button> </form>[/code] This would work without javascript.
  7. Put the charset inside this: [code]<?php header("Content-type: text/html; charset=**the charset here**"); ?>[/code] Note that it will have to be run BEFORE anything is output except if you use output control. Just put it on the very top and you'll be fine.
  8. [quote author=cburwell link=topic=110651.msg448018#msg448018 date=1160144364] I was thinking about the $_SERVER['HTTP_REFERER'] var, but I was thinking, what if someone came from google.com, and for some reason went directly to my login script? Then after they login they may be redirected back to google. I guess I would have to put some sort of check to make sure that did not happen. All this information should point me in the right direction. Thank you! [/quote] This would only happen if Google referred to the form. You could use [url=http://php.net/parse_url]parse_url[/url] to check if the referrer's domain is yours.
  9. Reading redbullmarky's topic [url=http://www.phpfreaks.com/forums/index.php/topic,110264.0.html]"Competition Idea"[/url] I would like to have a programming competition as this is a PHP forum/website. Each month users could reply to a topic in order to apply for the competition with their project/application. At the end of the month the other users could vote for the best application in a poll based on functionality/features (not layout and design as it is more like the stuff to compete about in redbullmary's topic). This would just be for fun so there wouldn't be a price except maybe a little image saying "PHP Freaks' programming competition, November 2006 winner" or something like that.
  10. You can use var_export as well. It will output it as the way you would define it in PHP. That could be useful for editing configuration files consisting of an array.
  11. In fact I think it runs like that on a webserver too, but it will interpret the code for the webserver and while it does that, it sends it to the webserver continuously. When it is all done the webserver sends the result to the client in one piece. That gives the illusion that nothing is output before script execution. The main difference between compiled and interpreted languages is that compiles languages is interpreted into something the computer can understand [i]one[/i] time where interpreted languages is interpreted [i]each[/i] time. So in my oppinion PHP is just as much a "real" programming language as the compiled ones.
  12. You could have something like this, but it would be kind of annoying to maintain multiple stylesheets: [code]<link rel='stylesheet' href='global.css' title='Global stylesheet' /> <?php if(check_for_ie_here) { ?> <link rel='stylesheet' href='global.css' title='IE stuff' /> <?php } else { ?> <link rel='stylesheet' href='global.css' title='FF stuff' /> <?php } ?>[/code]
  13. Try this: [code]<select name="category" onChange="location.href=this.value"> <option value="search.php">Any</option> <option value="search.php?cats=1">1</option> <option value="search.php?cats=2">2</option> </select>[/code]
  14. Could we see the form?
  15. It do not do spaces, it actually makes line breaks, but linebreaks show up as spaces when the HTML is rendered and the <br> ('break line' or something like that) represents the line break. In order to convert the line breaks into HTML line breaks you would have to use the function hostfreak showed you or make one yourself, but making a function that already exists would be sort of stupid.
  16. [quote author=redbullmarky link=topic=110606.msg447441#msg447441 date=1160075623] daniel, scripting languages do not work the same way as compiled programming languages [/quote] Depends on how you run it. If you run it using a webserver, then it don't, but if you run it from command-line it will work sort of the same way.
  17. [quote author=neylitalo link=topic=110606.msg447398#msg447398 date=1160072826] I suggest you don't use infinite loops for anything [/quote] If you need an application to run until something happens, then you would need an infinite loop. Try to look at some C/C++ tutorials, many of them tells you to use an infinite loop, well, not entirely infinite as it might be some like this (not sure if it's correct - I'm not very good at C): [code]#include <stdio.h> int main() { int option; while(1==1) { option = menu(); if(option == 1) { printf("Hello"); } else if(option == 0) { printf("Bye!"); break; } else { printf("Invalid option!"); } } return 0; } int menu() { int user_option; printf("MENU:"); printf("1) Say hello"); printf("----------"); printf("0) Exit"); scanf("%d", &user_option); return user_option; }[/code] I know it might be stupid to post a C example on a PHP forum, but it's the only thing I could come up with. And the reason why I said how he could do it in PHP is that he requested it to be like this.
  18. You would have to show us the source of the page that shows the guestbook entries. Another time please put the [nobbc][code][/code][/nobbc] tags around your code.
  19. [quote author=oldmanice link=topic=107919.msg447372#msg447372 date=1160071526] Heres mine www.myspace.com/bloodydarkcity [/quote] You can't view dark text on a dark background :P
  20. I think you can do it if you are able to stream the video feed. Make a script to run from the command line and have the code inside an infinite loop*, that should make it work. * an infinite loop is something like this: [code]while(1==1) { }[/code]
  21. I also think that PHP is known to be easy to learn, so just get started :)
  22. [quote author=ober link=topic=110476.msg446809#msg446809 date=1159986818] If I knew where to disable it, I would.  I don't believe that is an option, but you're more than welcome to test it by sending me a PM with me as the BCC recipient as well. [/quote] Ahh, you cant: [quote]You may not send personal messages to more than 1 recipient(s) at once.[/quote]
  23. You can use the title attribute on other tags than anchors.
  24. I believe that if you are on an encrypted connection it should be pretty safe.
×
×
  • 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.