Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. Ingolme

    How do I?

    Yes, just showing images next to eachother and changing the images is a simple task that can be done with HTML, CSS and Javascript. All you need to do is put onmouseover event handlers on the links, change the src attribute of the image when the event fires. Remember that you have two different images and you should reference the correct one when putting the event handler on the link. You can learn how to manage events properly here: http://www.quirksmode.org/js/introevents.html I advise against using event attributes right in the HTML.
  2. Ingolme

    How do I?

    One problem you have is that you're giving the same ID to multiple images. An ID can only be used once per document. Another problem is that you're using a variable "img" which hasn't been set. If you want to get the image use document.getElementById()
  3. If you're generating the URL with PHP, use urlencode(). If you're using Javascript, use encodeURIComponent() on each value before putting them in the query string. If you're manually writing this, substitute for character for the hexadecimal ASCII equivalent with a % symbol. For example # to %23 and ' to %27. I don't think you should have the ' characters in your query because they'll show up in the value when PHP reads it.
  4. Ingolme

    php math

    From the reference manual: http://es1.php.net/manual/en/ref.math.php
  5. You're getting a PHP error because you're asking for an index in mysql_result() that doesn't seem to exist. The easiest way to solve the problem is to use mysql_fetch_assoc() rather than mysql_result() to get data from the query. Looking at your second code more carefully, you don't seem to have a while loop and you have a pair of braces { } that aren't representing anything. echo '<form action="#" id="test" name="test">';echo '<select name="item">';echo "<option></option>";echo "<option>";{echo '' . mysql_result($result,$n,'item') . '<br />';}echo "</option>";echo '</select>';echo '</form>'; Somebody already provided working code for your question in this thread: http://w3schools.invisionzone.com/index.php?showtopic=49767
  6. Ingolme

    types in phpmyadmin

    Databases can save any type of data. The BLOB field stands for Binary Large OBject and can be used to store the contents of any file including image or video. Given that, I still find it preferrable to store file data in the filesystem rather than the database.
  7. You probably should use mysql_fetch_assoc() instead. Best if you used a more recent database library, such as mysqli or PDO, because mysql is insecure and is being deprecated.
  8. I don't see where $of_array is being set. If the system is not working properly, manually print out the values of $CURUSER['u_FK_uc_id'] and the result from the database to see what's wrong. I notive you're doing the exact same query twice: $farray_res = sql_query("SELECT * FROM forums WHERE f_FK_of_id = ".$of_arr['of_id']." ORDER BY f_id");$f_array = mysql_fetch_assoc($farray_res); $f_res = sql_query("SELECT * FROM forums WHERE f_FK_of_id = ".$of_arr['of_id']." ORDER BY f_id"); You can avoid that by moving the result pointer back to the first result using mysql_data_seek(). You probably should use a newer database extension than mysql, because mysql is deprecated due to security.
  9. Ingolme

    Floating Elements

    If the element containing the floated elements has overflow set to "hidden" or "auto" it will expand to take the height of all the elements it contains.
  10. You don't have any foreign keys to the userAccount table in the task table so I don't know which field is referencing the student. Assuming that account_id references the userAccount table, then select the fields WHERE account_id=[students account ID]
  11. Go through your document again and make sure you don't have any duplicate IDs. When I tested your page the first element with a "Book" ID was being manipulated but not the other one which you intended to change. By changing the ID of the first book element your page should work as you intended.
  12. Ingolme

    upload videos

    If your videos are saved in the correct format then the browser can natively play videos using the <video> element.
  13. Whatever you find on W3Schools should work. Window is the root of everything. Whatever you see on this page is what you can use: http://www.w3schools.com/jsref/default.asp
  14. Ingolme

    Tables and CSS

    You can't set colspan with CSS, it's an inherent property of the table cell. The spacing between cells can be changed with the border-spacing property.
  15. Ingolme

    upload videos

    The player isn't related to the uploading. The player will play whatever videos it finds on the server, to upload a video to the server you do the same as uploading any other type of file. Here's a file upload tutorial for PHP: http://www.w3schools.com/php/php_file_upload.asp
  16. It means that you should try, if possible, to allow the page to load while the script is loading. That would mean using the defer or async attributes. This may cause problems in your Javascript if you don't manage the execution order of your scripts properly.
  17. The problem is that you've put the #container element ontop of the menu. Try to make a layout without using "position: absolute" because it always causes problems.
  18. When you call mysql_fetch_assoc it moves the pointer ahead and you won't get data from that rown anymore. So in the following code you're not printing any data from the first row $f_array = mysql_fetch_assoc($f_res);while($f_arr = mysql_fetch_assoc($f_res))
  19. If you want to load the tasks for one particular user you probably have to check that useraccount.account_id has one particular value. I can't be sure, though, since I don't know the structure of your database.
  20. I see nothing in your code that would cause the <ul> to disappear, the code you presented here works fine for me. You should have a <!DOCTYPE> at the beginning to ensure that all browsers work properly when displaying the page.
  21. You need to make the correct SQL query if you want the correct data. What does your query look like?
  22. You'll need a way to identify the person who submitted the form.
  23. The button is being replaced, so I don't believe event handlers are carried on. I think jQuery has a function called on() which will keep event handlers assigned to an element after manipulating the DOM.
  24. You have two different elements with ID "Book" so it's only modifying the first one.
  25. It will go reducing the amount of boxes per row as the window gets thinner. The will be a gap on the right side, but it would be smaller than the width of one box and in the best of cases the gap will hardly be noticeable. That's about as much as you can get with CSS. Then there's @media queries so you can apply a different style to the boxes when the window gets too small.
×
×
  • Create New...