Jump to content

Ingolme

Moderator
  • Posts

    14,897
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by Ingolme

  1. The name attribute was used to identify elements in Netscape and old versions of Internet Explorer.
  2. Ingolme

    video on my site

    If you're talking about Flash, the player is always SWF. The video player could be programmed to use a variety of formats, depending on what Flash natively supports.
  3. Personally, I'm not bothered if a user messes up my site with a long word. If they're posting something like that I most likely would have to delete their comment due to spam. Therefore, though I would apply the word-wrap property I wouldn't go out of my way to support older browsers.
  4. No, the hash part of the URL's relation to the ID has been standard for a decade at least.
  5. Ingolme

    What's wrong?

    You'll need to post the whole if() structure and make sure that the values you are giving are what you expected them to do.
  6. The SQL INSERT query allows you to add as many rows as you like. My loop is an example of how to do it automatically. The intention is to create a query like this: INSERT INTO table (field1, field2, field3) VALUES('value00', 'value01', 'value02'),('value10', 'value11', 'value12'),('value20', 'value21', 'value22') Supposing that you have multiple fields that use the array syntax here's a way to add them all with a single query: $fnames= $_POST['fname'];$lnames= $_POST['lname']; $length = count($fnames); $query = 'INSERT INTO table (fname, lname) VALUES ';for($i = 0; $i < $length, $i++) { // For safety, mysql_real_escape_string() is applied $query .= "('{$fnames[$i]}', '{$lnames[$i]}'),";} // Send the $query to the database library you're using
  7. The array name is $_GET, as opposed to $_get. Putting <div> elements inside <a> elements is invalid in HTML.
  8. If you use array notation on the <input> names then you can access them as an array in PHP. Field 1: <input type="text" name="text[]">Field 2: <input type="text" name="text[]">Field 3: <input type="text" name="text[]"> In PHP: $query = 'INSERT INTO table (field) VALUES ';foreach($_POST['text'] as $t) { $query .= "($t),";}// Remove the last comma$query = substr($query, 0, -1); Since you have multiple fields, it may be better to go through them with a for() loop.
  9. You really shouldn't need a word so long that it gets outside the box. The best suggestion would be to use proper words and you won't need to change anything.
  10. It depends on your idea of layers. Some systems load all the content of all the pages and then use Javascript to hide all the sections that weren't selected. If Javascript is disabled, the links just scroll down the page to the right section. <ul id="menu"> <li><a href="#section1">Section 1</a></li> <li><a href="#section2">Section 2</a></li> <li><a href="#section3">Section 3</a></li></ul> <div id="section1"> Content</div><div id="section2"> Content</div><div id="section3"> Content</div> Another possible way is to load the sections with AJAX, and if Javascript is disabled then the links will open the page using PHP instead: <ul id="menu"> <li><a href="section1.php">Section 1</a></li> <li><a href="section2.php">Section 2</a></li> <li><a href="section3.php">Section 3</a></li></ul><div id="content"> Content</div> I've omitted the Javascript and PHP in my examples because it's important to understand the page structure first. Also, this HTML should not need to be modified, you should be able to access and manipulate the elements with Javascript and CSS without adding any extra attributes.
  11. Ingolme

    setcookie issue

    Normally, I have the same global system running on every single page of my website, while each page has its own additional code. You should include a file with the code that checks the cookie on all the pages of your site.
  12. Notepad is OK, but a color-coded editor is better. There are many of them and each person will suggest a different one. Personally, I use Notepad++ http://notepad-plus-plus.org/ Browsers render websites differently depending on the document type declaration (<!DOCTYPE> tag). If the DOCTYPE is missing or wrong then the browser will use an old rendering engine that does not follow the W3C standards. Each browser has their own way of doing this so the page will look very different between different browsers. When the DOCTYPE is correct, browsers should generally render the page the same with only minimal differences. You should use the W3C validator on your pages to look for HTML errors. The link I gave you in my previous post is important.
  13. The first thing you have to do is make sure that your page is valid HTML.http://validator.w3.org/ The first and biggest problem is the lack of a document type declaration.
  14. Ingolme

    What's wrong?

    You misquoted my post. When curly braces are omitted only one line of code is considered the part of the block of code that is associated with the keyword. The keyword can be if, else, elseif, else if, for, while, foreach.
  15. Ingolme

    What's wrong?

    The problem is that you're trying to make two comparisons in one statement. You need to separate them: elseif (3.2 < $media && $media < 7) Curly braces are not a requirement and it is syntactically correct to omit them. The only problem being that only the next line of code will be considered part of the block.
  16. One big problem is that when you set width to 100% you must remember that adding any padding, margin or borders will cause the box to extend outside the window making scrollbars appear.
  17. One way is to give the <body> element of each page and the links a class name. <body class="home"> <a class="home"><a class="contact"><a class="about"> Then you can highlight any link that has the same class name as the <body> element: body.home a.home, body.contact a.contact, body.about a.about { color: black; font-weight: bold;}
  18. There shouldn't be scroll bars when set to auto unless your content is getting outside of the box. Though setting it to hidden certainly is a better option.
  19. The wrapper will extend around the boxes if you set overflow to "auto". Normally, a block won't consider floated or positioned children when calculating its height.
  20. I'm kind of surprised that this code works at all. Neither document.layers nor document.all are standard, and Netscape no longer exists. If this were my project, rather than trying to fix this code I would write a new one from scratch. It looks like the selectDate() function might do what you want it to but I'm not sure.
  21. An interface allows multiple independent classes to be used in the same way. The interface tells the class the name of the methods it has to implement, but each class can implement the methods however suits it best.
  22. It was already deprecated in HTML 4.01 and XHTML 1.0 Strict.
  23. There's no name attribute for the <a> element. The #hash part of the URL targets any element that has an ID matching the #hash value.
  24. Class names and IDs must start with a letter.
  25. In that case the only way to do it is a large image, taking up the full extension of the gradient. Or you can use CSS3 and leave older browsers to have a worse version of the page.
×
×
  • Create New...