Search results

  1. M

    Little PHPlot problem

    It is most likely an issue with freetype, PHPlot or GD. When run under Apache 2.2.14+PHP 5.3.1+FreeType 2.3.11+PHPlot 5.1.2, your script displayed the text with no issues. For now, try PHPlot 5.1.2. I can't currently access my X10 account, so I can't test anything X10, nor determine what...
  2. M

    PHP/MySQL Query Help

    Probably. Will we? Probably not. Don't threadjack. This forum is for programming. If you're not writing your own CGI relay, you're in the wrong place. Ask specific questions, not ill-defined, open ones. Specify what you want and what you have. If you're dealing with non-functioning code, this...
  3. M

    PHP/MySQL Query Help

    In that case, amend my earlier example to structure the data as pre-formatted content: <pre><?php $prevY = 1; foreach ($db->query('SELECT x, y, z, textimage FROM test WHERE x BETWEEN 1 AND 100 AND y BETWEEN 1 AND 65 ORDER BY y, x') as $piece) { if ($prevY != $piece['y']) { echo "\n"...
  4. M

    Removing .html from url

    The server configuration on X10 currently requires that you set RewriteBase. In your root .htaccess, it would be: RewriteBase / A simpler alternative to rewrite-based extensionless (aka clean) URLs is to use content negotiation: Options +MultiViews All of this has been covered many times on...
  5. M

    PHP/MySQL Query Help

    Which makes it confusing, since you're making a new request by changing the original. On a site like SO, updating the original post is the correct action, but this is a forum; it's fine (rather, preferred) to write updates in new posts. What happens instead, and how is it different than what...
  6. M

    Error 500 - .htaccess help

    These options should be on separate lines.
  7. M

    Centering image within an iframe

    There's only one response to that: "Why avoiding tables (for layout) is important" Well, two responses, but the title of the second article could be considered insulting: "Why tables for layout is stupid" (It's not, as it's the action that's stupid, not the person using tables for layout.)...
  8. M

    Centering image within an iframe

    The document in an iframe is the same as the document you'd get when viewing the URL in a full tab/window. In the case of an image, the browser usually creates a minimal document which you have little control over. The style cascade doesn't cross documents, so any style set in the containing...
  9. M

    Reset after an hour

    What do you mean, exactly, by "reset"? Do you want to allow visitors complete backend access, restoring a default configuration and removing all posts? This would allow visitors, if unchecked, to do quite a bit of damage. You should also look into imposing limits on the amount & types of...
  10. M

    auto sum of the input field

    Since you want to perform processing client-side, you'll need to use a client side script. The only client-side language that's supported across browsers is Javascript, so that's what you'll have to write it in. JS libraries (such as jQuery, Prototype and MooTools) can make this very easy. Just...
  11. M

    Php database connect problem

    It's probably a transient problem with the MySQL servers. If it persists, work through the many threads on this topic (you should always search before starting a new thread). The old mysql driver is quite outdated, having been supplanted twice over. PDO is the modern extension to use. If you...
  12. M

    need help on this php script

    Please use , [html] or [code] tags (as appropriate) to separate and format code. There isn't enough information to diagnose the issue. You need to examine the values of the various variables. The best way is to use a debug extension for PHP (such as Xdebug) and an interactive debugger, which...
  13. M

    backup script

    For MySQL backup solutions, try searching the forums. You shouldn't need to backup files because the website shouldn't store the primary copies. Develop the site on your own computer and store primary copies there or in a dedicated revision control system (aka version control or source control...
  14. M

    Error: Duplicate entry '' for key 4

    I'm going to have to disagree with Descalzo about the activation key being unique in the current design. Notionally, the activation key is unique to an account, since it's sufficient to identify an unactivated account; it's a candidate key. If the activation key and some other piece of...
  15. M

    Error: Duplicate entry '' for key 4

    Please use , [html] or [code] tags (as appropriate) to separate and formate code. What about the table structure? Is column activationkey unique? Is it in the primary index? Is it allowed to be Null? Don't use SELECT *; select only the columns you need. The statement also needs a WHERE...
  16. M

    Error: Duplicate entry '' for key 4

    Show us the code (in particular, a minimal test case consisting of PHP and SQL) and DB structure. Otherwise, we can only guess as to cause. So you don't increase load on the MySQL server, rather than issuing additional queries you can suppress or disable error messages and test the result of...
  17. M

    suspension

    Did you log in to the X10 account panel? From there, you should be able to unsuspend yourself, since you were suspended for inactivity. Just make sure you wait no more than a month (the current length of the inactivity timer) to log in to the forums.
  18. M

    Cannot upload information from cPanel

    Can you connect via FTP? DreamWeaver is probably using FTP, but not necessarily. Try the password reset tool in the X10 account panel.
  19. M

    Help Needed with Radio Buttons!

    Indeed. Next time, I'll take a closer look at the code. A quick test shows that this only works in most (all?) browsers when inputs have an ID, and the label targets it. In summation, moniquedbabin79, IDs on inputs are essential for accessibility. It falls in the overlap between human...
  20. M

    Need help with PHP Time of Day Image Change script...

    Leading zeros cause numbers to be interpreted in octal (if possible). This won't be an issue in the example code since oct 0X == dec X, for X < 8. It will cause problems other times, so be careful. If you find yourself writing a sequence of if statements, you should generally rewrite it using...
Top