Search results

  1. M

    need help on php/html

    Remember, HTML is about structure, not layout. Stop thinking "I need a new line here, so I'll put in a <br/>". First, come up with the structure, then style it. It looks like you're listing items, so using list elements is a natural fit. <ul class="items"> <li><img src="..."...
  2. M

    index.html works, index.php does not.

    DirectoryIndex won't apply when the URI denotes a file. If http://www.michaelalexandersalon.com/index.php results in a 404, it's because either there is no index.php in the document root, the URL gets rewritten to point to a non-existent file (which the lone RewriteRule given won't do) or...
  3. M

    Cant edit error pages?

    Note that if you give a full URL, it will result in an external redirect. The URL of the error page will be visible in the visitor's browser and (more importantly) the HTTP status will be the status returned for the error page's URL, rather than the original URL. This means the status will be...
  4. M

    CSS Layout Help

    The HTML structure doesn't seem to reflect all the elements in the paper prototype. In your prototype, is "Heading" an image or text? Is the circled region (the image of people) part of "heading.jpg" or something else? Specifying pixel dimensions (all the "width" and "height" CSS properties and...
  5. M

    CSS Layout Help

    Please post minimal HTML source for the CSS to style. It's hard to develop CSS without that information.
  6. M

    Saving echoed form page

    You could use the Zip module and create an archive with the HTML and the images, then output that. What e-mail apps is the e-mail signature intended for? Outlook?
  7. M

    JavaScript - Loading contents from one div to another

    Fair enough. @kbjradmin: if you want or need to study closures more, read Richard Cornford's "Javascript Closures" on Jibbering.com. And in case you haven't seen array literals, they are a faster-to-type alternative to using the Array constructor: var contents = [...
  8. M

    JavaScript - Loading contents from one div to another

    All of them could apply. Arguable, the first (separation of behavior & structure) might apply the least as it's mostly a matter of design philosophy, but it's a very clean design philosophy. Which is a problem with the technique and needs to be fixed in his implementation. He defines three...
  9. M

    need help with mysql data base

    Whatever ancient tutorials keep screwing up people's code with terrible examples need to be hunted down and shot. You neglected to post the error. Here it is, for people searching for this error in the future: You really shouldn't make us wait for the connection to time out to get the error...
  10. M

    JavaScript - Loading contents from one div to another

    Generally speaking, there are three reasons: separation of behavior from structure, making the page degrade gracefully when JS isn't available (the HTML page is designed to work w/o JS, and scripts add functionality), and to reduce code repetition. I recommend letting the address change. It...
  11. M

    need help with mysql data base

    Not so much all the related code as a minimal test case, along with other pertinent and relevant information, such as the behavior you expect and the behavior you get, including error messages. Don't make us do extra work. Remember to search the forums and the web at large before posting. If...
  12. M

    How do I hide the javascript on a link?

    Use a click handler rather than the href attribute. You can set one in JS using DOM event registration (create a wrapper around addEventListener/attachEvent to make it cross-browser) or the onclick property, or set it inline using the onclick attribute. Just make sure your code degrades...
  13. M

    Custom Error Page for Subdomain

    Subdomains either use the rewrite engine or virtual hosts. Both of these will cause problems for error documents defined on the top domain. The apache configuration options for Wordpress are also probably causing problems. What else is in .htaccess?
  14. M

    JavaScript - Loading contents from one div to another

    The first error in the live page is that the initialization script calls changeContents("home") (plural), but the function in pseudoframe.js is called changeContent (singular). Once you fix this, notice that #content is successfully changed to the contents of #home, suggesting the problem...
  15. M

    JavaScript - Loading contents from one div to another

    That's not quite enough information. We need to actually see how changeContent is called. Please include enough JS (make sure it generates the error) to make your example testable and post a link to a live page.
  16. M

    Against SQL injection (PHP-MySQL)

    The more modern approach is to use prepared statements (see also mysqli::prepare()): $db = new PDO("mysql:host=localhost;dbname=$dbName", $dbUser, $dbPassword); # Named parameters $stmt = $db->prepare("SELECT id, surname, given_name, birthday FROM users WHERE surname=:surname AND...
  17. M

    Can anyone tell how to find.........

    Note that zen-r doesn't remember where the 32MB max comes from, which means you don't know what the limit applies to. Next time, perform more research and don't jump to conclusions. To find the per-script memory limit set by the PHP engine (a good candidate for a 32MB limit; the default is...
  18. M

    Please help -myphpadmin

    Don't threadjack. Start your own, but not until you've searched the forums and the web for an answer. If and when you start a thread, follow the guidelines in "How To Ask Questions The Smart Way". Use a descriptive subject line. Describe the software environment you're using. Describe the...
Top