Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Err

  1. The way I've always done it for youtube videos. Usually, if I'm posting videos, I'm not gonna care about standard HTML so this works. <object width="425" height="350"> <param name="movie" value="http://www.youtube.com/v/zSgiXGELjbc&rel=0&iv_load_policy=3&loop=1"></param> <embed src="http://www.youtube.com/v/zSgiXGELjbc&rel=0&iv_load_policy=3&loop=1" type="application/x-shockwave-flash" width="425" height="350"></embed> </object>
  2. You should really consider validating your pages. You have code between your <head> and <body> tags and probably other errors that's contributing to your problem. http://validator.w3.org/
  3. Err

    MySQL Update... Limit

    It's easier to think of this as a single row being edited after a search was done then a link was clicked to modify that specific row in a database table. That is what makes any x number of result significant. Edit: I should note, I've tried to do this several different ways. You mentioned two queries. This is what I found on my searches: UPDATE `iconomy` SET `status`='1' WHERE `id` LIKE '%j%' OR `username` LIKE '%j%' OR `balance` LIKE '%j%' OR `status` LIKE '%j%' IN (SELECT * FROM `iconomy` WHERE `id` LIKE '%j%' OR `username` LIKE '%j%' OR `balance` LIKE '%j%' OR `status` LIKE '%j%' ORDER BY `username` DESC LIMIT 7, 1) The query still doesn't work.
  4. Err

    MySQL Update... Limit

    I am trying to make a SQL string that updates based on the WHERE and the LIMIT clause. I'm trying to do: UPDATE `iconomy` SET `status`='1' WHERE `id` LIKE '%j%' OR `username` LIKE '%j%' OR `balance` LIKE '%j%' OR `status` LIKE '%j%' ORDER BY `username` DESC LIMIT 7, 1 Basically, the above is suppose to update "status" where results are like "j" and are order by "username" in a descending fashion, which pulls many results but I try to only target the 7th result of this query. Problem is, this doesn't work for UPDATE, although it works great for SELECT. Is there a way I can do this using an UPDATE query? The tables are dynamic so there isn't an id or primary key that I can rely on.
  5. You want to know how to send "firstname" through the forms? <input name="firstname" type="text" class="formFields" id="username" value="<?php print "$firstname"; ?>" size="32" maxlength="36" />
  6. Err

    Please help!

    If you don't already have it, I would highly recommend WampServer (if you're using Windows), it installs Apache, PHP and mysql in one go.
  7. It's a settings file for your PHP. What to turn off/on, limits, extensions... you know.
  8. Well, yeah. But your host should already have a php.ini installed for that server.
  9. I know it's bad coding but you can always put a IE 9 only CSS. It won't affect other browsers just the target IE browser.
  10. As far as I know, it doesn't come with any because you have to add your own. I know some do have them already installed though. It isn't really a big deal if you don't have them, when you come across those errors it will tell you that you don't have pages set for those errors. You can usually set the pages in the ErrorDocument or .htaccess settings of your hosting site if your web host allows you to add them. Personally. I use a PHP page. I set it up so I didn't have to create a page for every error (404.shtml, 500.shtml, etc.). It's pretty simple actually. If it's any help to you, I'll post it. For every error document I simply did: ErrorDocument 400 error.php?err=400ErrorDocument 401 error.php?err=401ErrorDocument 403 error.php?err=403ErrorDocument 404 error.php?err=404ErrorDocument 500 error.php?err=500ErrorDocument 503 error.php?err=503 This is error.php: <?php $url = ($_SERVER['QUERY_STRING']) ? basename($_SERVER['PHP_SELF'])."?".$_SERVER['QUERY_STRING'] : $_SERVER['PHP_SELF']; $uri = (basename($_SERVER['REQUEST_URI']) != $url) ? "<b>".basename($_SERVER['REQUEST_URI'])."</b>" : "This page"; $err = (isset($_GET['err'])) ? $_GET['err'] : ""; switch ($err) { case '400': $til = "Error 400 - Bad Request"; $txt = "<h4>$til</h4>\n". "<p>The server detected a bad request in the client's request.</p>\n"; break; case '401': $til = "Error 401 - Unauthorized"; $txt = "<h4>$til</h4>\n". "<p>Client unsuccessfully tried to access a password protected page.\n". " If you do have a valid password/username please go back and try again.</p>\n". "<div><img src=\"401.gif\" alt=\"401.gif\" /></div>\n"; break; case '403': $til = "Error 403 - Forbidden"; $txt = "<h4>$til</h4>\n". "<p>Server configuration does not allow you access to this area.</p>\n"; break; case '404': $til = "Error 404 - Page Not Found"; $txt = "<h4>$til</h4>\n". "<p>$uri was not found. If you typed in the web \n". " address manually please make sure you don't have any spelling\n". " errors and try again.</p>\n". "<div><img src=\"404.gif\" alt=\"404.gif\" /></div>\n"; break; case '500': $til = "Error 500 - Server Error"; $txt = "<h4>$til</h4>\n". "<p>This site has encountered a server error. This is most likely\n". " the cause of an error in a server-side script, therefore it is\n". " temporary. Please check back in a few minutes and try again.</p>\n"; break; case '503': $til = "Error 503 - Service Temporarily Unavailable"; $txt = "<h4>$til</h4>\n". "<p>The server is currently unable to handle the request due to a\n". " temporary overloading or maintenance of the server. The implication\n". " is that this is a temporary condition which will be alleviated\n". " after some delay.</p>\n". "<div><img src=\"503.gif\" alt=\"503.gif\" /></div>\n"; break; default: header("Location: error.php?err=404"); }?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> <title><?php echo $til; ?></title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="robots" content="noindex, nofollow" /> <style type="text/css"> html, body { font-family: 'Lucida Console','Courier New'; color: black; background-color: white; } h4 {font-size: 20px; margin-bottom: 10px; border-bottom: 1px solid red;} p {font-size: 14px;} div {text-align: center; padding-top: 10px;}</style> </head><body> <?php echo $txt; ?> </body></html>
  11. Err

    Anchor Link Color

    Working with CSS (the classes as you call them) can be added to any web page easily. But if you don't want to work with them, you can always set the color directly on the link.<a style="color:blue;" href="#someid">anchor 1</a>Just change blue to whatever color you want.
  12. You need to have a mail sever for mail() to work. If you are working on your computer you can install a free mail server, just do a search. If you are working off a hosting site, they most likely only turn on that feature for paying customers.
  13. I haven't worked with frames for quite some time, but let's see if I remember correctly. You basically want three frames instead of two that are vertical.Add another <frame>, change *,25% to *,33%,*
  14. Pastebin or just post your code directly here.
  15. I think what you're looking for is the PHP function htmlentities()
  16. I'm you can easily do this with PHP, but if you want to load the image below your smaller image, the page will have to load again with it. If you want something more fluid, it will have to be with JavaScript. Try here: http://www.dynamicdr...dex4/index.htmlI'm sure you'll find something close.
  17. Err

    ssh2 CLI

    That was very helpful! Thanks for your input, it has pointed me the correct direction. I knew I was making it too hard.
  18. Err

    ssh2 CLI

    I'm trying to connect to a running terminal on my ubuntu server from my website (on the same server). I have installed ssh2 sshserver and a whole bunch of other stuff to get it to work. I basically followed this tutorial: http://kevin.vanzonneveld.net/techblog/article/make_ssh_connections_with_php/ After days of tweaking I finally got it to work. But there is a problem. I don't care about connecting to port 22. I want to connect to a game server terminal running on the ubuntu machine which uses a different port. I've tried looking this up but I'm overwhelmed by the things I read. Seems overly complicated for something seemingly easy. Changing the port gives me errors. I'm using PHP 5.3.6-13ubuntu3.3
  19. Yeah, If you don't have PHP running, you'll get very weird errors on your webpage like the one you got.
  20. Just curious, does your webpage you complied run PHP code? If so, post your entire code.
  21. Err

    Data Transfer Rate?

    I'm trying to get the time it takes to finish loading a script of mine. I have it in a loop that does the same action over and over again for a set number of times and each loops takes a required amount of time. However the number loops that it has to do increases over time. I'm trying to find a way to get the estimated amount of time for the script to finish. I've looked into data transfer rate, which is alright for connections over the internet but I'm dealing with things server-side. Any idea how I can go about this?
  22. Personally, I like to use the extra brackets around variables that are in strings, makes them easier to read: $str = "'{$row['name']}', '{$row['region']}', '{$row['city']}'";
  23. To check if your using good standards, you can validate your code and fix any errors. http://validator.w3.org/
  24. as long as the user refreshes the page everyday the stats will be updated.
  • Create New...