Jump to content

Ingolme

Moderator
  • Posts

    14,894
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by Ingolme

  1. There are two options: Use the rgba() color format or use a transparent PNG image.
  2. I can't see why you couldn't upload them. What happens when you try?
  3. But you've done it before. You have an example of MySQL queries in several topics. You connect to the MySQL server with mysql_connect() and then use mysql_query() to perform the query.
  4. It sounds like the directory you're trying to move the file to doesn't exist. You have to create it. if(!file_exists('path/directory/')) { mkdir('path/directory/');}
  5. Ingolme

    url

    It's not simple. Look up URL rewriting on a search engine.
  6. Ingolme

    Next step?

    You put it wherever on the page you want the data to appear.
  7. I don't know what "id" is. Is this a field in a database table?
  8. Either of two possibilities: $_GET['cat_id'] is set but blank, or the shop_cat database table is empty.
  9. I think it's quite clear what the problem is. Can you see it?
  10. I suggest you do some reasearch. Like I said, a flag is just a switch, which can be represented as a boolean.This is one way to create flags: var flags = {};flags.up = false;flags.down = false;flags.left = false;flags.right = false; Here's another: var flags = 0;var UP = 0x01;var DOWN = 0x02;var LEFT = 0x04;var RIGHT = 0x05 You will have to do some research because game programming is not something that anybody can just teach on a forum. Online resources will teach you how to use flags.
  11. If I read correctly, this is the query that's supposed to have an error:SELECT * FROM shop_items WHERE FK_catID = ".$catID Print out the value of that and see what it looks like.
  12. A flag is like a switch. A series of flags can be stored in a set of booleans or an integer.When you execute your move() function, you can check through all the flags to see which ones is activated. Let's assume that the flags are properties of a global object called "flags" // Vertical motionif(flags.up) { // Move up X pixels} else if(flags.down) { // Move down X pixels}// Horizontal motionif(flags.left) { // Move left X pixels} else if(flags.right) { // Move right X pixels} Of course there's a lot more to it, and this is probably not the optimal way to solve the problem, but you'll have to do some thinking and research on your own.
  13. What I'd do is have a set of flags. Each keydown event activates a flag. Then one single "move()" function will check what flags are activated and choose a direction based on that.
  14. The problem is that when you're resizing, the width of the text changes, and you've forced a specific padding on each navigation element so it may be too large and force extra list items to the next line. When the bottom right round corner of the header drops to the next line, the fact that is is floated left makes the main content area go next to it. The content area's width added to the width of that round corner and the width of the right column is too large for the line, so the last element is forced below the content. The first solution would be to give each link of the navigation menu a fixed width and text-align: center, and remove all the left and right padding. Make sure that the sum of all the fixed widths of the elements does not exceed the width of the parent container. Your bottom-right corner element, even when it fits, does not seem to be properly positioned so it's probably best to float it to the right instead of the left.
  15. Ingolme

    browser issues

    Your wrapper shouldn't be absolute unless it also has a stargate classname. You can't center elements that have absolute or relative positioning.
  16. Ingolme

    browser issues

    First of all, instead of "margin-left" and "margin-top" use "left" and "top"
  17. You can do a lot of stuff that Flash does without Flash, but you just can't do animating with HTML5 and CSS3. At least not until somebody develops an HTML5 and CSS3-based animating program that saves the result as Javascript.Flash might be over for the web, but still has a lot of practical uses. It has a stage, drawing tools and a powerful scripting language.
  18. The quotation marks will be considered ordinary character data, unless they're the delimiters for an attribute.
  19. Entities always end with a semi-colon. It is incorrect not to do that, whether or not they're inside attributes. I don't know about Internet Explorer's support for entities but I can't remember seeing any complaints about it before.
  20. You should use $_GET if you're using parameters of the URL. You can get the query string with $_SERVER['QUERY_STRING'], the $_SERVER['SERVER_NAME'] will get the host. $_SERVER['REQUEST_URI'] gets everything that follows the host name in the URL. Maybe you can find other useful things on this page: http://es.php.net/manual/en/reserved.variables.server.php
  21. Ingolme

    Realtime form

    You can run a function with the onkeyup event, but that would be Javascript and not PHP.
  22. Ingolme

    Good example?

    When you're doing an SQL query, you put data into it that was given to you by a user. If the user is smart, they can mess up your database. If they aren't smart, there is still a chance that the site has an error when trying to make a query. For example in this code: <?php$username = $_GET['username']; $query = mysql_query("SELECT * FROM users WHERE username='{$username}' ");?> If a user decides to send "O'Reilly" as an input, the query will work wrong because of the apostrophe. Here is how the query would look: SELECT * FROM users WHERE username='O'Reilly'In order to solve this problem, we do something called "sanitizing" which turns the string into something that won't mess up the query.To sanitize with the mysql extension we use mysql_real_escape_string(): <?php$username = mysql_real_escape_string($_GET['username']);$query = mysql_query("SELECT * FROM users WHERE username='{$username}' ");?> The sanitised string looks like this: SELECT * FROM users WHERE username='O\'Reilly'
  23. There shouldn't be a scrollbar with the overflow property if the height isn't fixed. The overflow property just has strange effects on the document flow and is a good way to extend a container over floated elements without an extra element.
  24. Unfortunately, Firefox doesn't work with custom entities. It's not just inside attributes but anywhere in the document.
  25. If these are inside the same container, just set the container's overflow property to "hidden" or "auto"
×
×
  • Create New...