Search results

  1. M

    php and sql help

    When asking for help, describe what you expect and what you get, including any error messages and program output. Please use [php], [html] or [code] tags (as appropriate) rather than
  2. M

    PHP 5.3 Help

    If the third party package is still in development, the best thing to do is file a bug report and let the package developers sort it out. Turning off deprecated warnings will take care of things in the short term, until a new version of the package is released. If you're really kind, you can...
  3. M

    New to PHP, Point in the right direction?

    If you're new to programming, you should be doing this yourself only as a learning exercise and not for a production site. Otherwise you'll find yourself making mistakes fatal to your site. A recent post provides an example of this. Instead, find a BBS or content management system (CMS) that...
  4. M

    Login gives "500 Internal Server Error"

    You may also wish to add a call to session_regenerate_id after successful login to prevent session fixation. Is there a call to session_start that's not shown in the sample?
  5. M

    session_start error...

    Start with the likes of "Headers already sent" and "$_SESSION Problem state not changing" (a search for the error messages should have turned up at least the second one) and post an archived (e.g. zipped) copy of your script.
  6. M

    php and my sql HELP PLEASEEEEE

    Please use [php], [html] or [code] tags (as appropriate) to separate and format code. The sample code is vulnerable to SQL injection, which is a very serious security risk. To fix this hole, switch from the outdated mysql extension to PDO and use prepared statements. If you need a PDO tutorial...
  7. M

    php and mysql help

    Do NOT use er.rohittank22's code. It is incredibly insecure (vulnerable to SQL injection, vulnerable to session hijacking, stores passwords as plaintext). It also uses the outdated (and soon-to-be deprecated) mysql extension. It's a great example of why you shouldn't do this yourself for...
  8. M

    php and my sql HELP PLEASEEEEE

    Just make sure you don't dump the entirety of your code. A code sample should be complete yet concise and representative of the actual code. Also, no need to shout in the thread title or elsewhere. It conveys no useful information.
  9. M

    PHP Table

    Note that "essentially" is quite different from "exactly" when it comes to programs; a single character can make a huge difference. We need to see a complete, concise, representative code sample. Otherwise, it's impossible to say with any certainty why the code doesn't generate any input elements.
  10. M

    MYSQL CAN NOT CONNECT TRYED localhost

    I'm sorry for the curt tone of my comment. It came off harsher than I intended. What I should have written was: Please write in grammatically correct English. Improper capitalization and lack of punctuation makes you hard to understand. Slang makes your post hard to understand for...
  11. M

    Java Scripts

    That's not what tables are for. And that's still not JavaScript. You'd better stay on topic.
  12. M

    PHP/RegExp: Escaping forward slash

    Note that you don't need to use forward slashes as delimiters. Pick a different delimiter and you don't need to escape the slash. preg_match('%\[a\](.*?)\[/a\]%i', '', '') However, regular expressions aren't terribly suited for parsing context-free languages such as BBCode. If someone were to...
  13. M

    PHP 5.3 Help

    The POSIX regular expression functions, such as eregi, should be replaced with the PCRE ones, such as preg_match. The PHP manual outlines the differences between POSIX and PCRE regexes and how you can convert, such as using the "i" modifier for case insensitive matching. When posting code...
  14. M

    Help Needed with Radio Buttons!

    Please don't revive dead threads. OP's problem wasn't creating radio buttons, but getting them to group so only one would be checked at a given moment, so I don't see how your post helps.
  15. M

    Moving files out of a password-protected directory

    Your code fragment is most likely vulnerable to injection via $_POST ['Filename']. Someone could overwrite any file on the server that your account has write access to. Password protection of the script isn't enough, as you must plan against the possibility that someone will crack it. On...
  16. M

    Using Javascript to check if image has loaded?

    Firebug isn't showing you a source view, it's showing you a DOM tree. The only place there's such a thing as a self-closed tag is in HTML source. Moreover, you don't need to be too concerned with the HTML source that someone else's code generates.
  17. M

    Dynamic 410 Gone away file?

    Use whatever your language of choice has to set HTTP response headers to set the status. For example, in PHP: header('HTTP/1.0 410 Gone');
  18. M

    MYSQL CAN NOT CONNECT TRYED localhost

    Start with the X10 Wiki articles on internal server errors and MySQL Connection Errors. However, incorrect MySQL connection information will not generally cause a 500 response. It's not at all clear from your post what your problem is. I hope for your sake English is a second language.
  19. M

    Mahara MySQL UTF-8

    Where did you look in phpMyAdmin? You can set which character encoding MySQL uses for many things: for connections, the server, databases, tables and columns. Make sure you're checking the character encoding for the database (and tables, while you're at it). You can check the collation (hence...
  20. M

    Moving files out of a password-protected directory

    This, but you should be using filesystem paths, not URLs. HTTP URLs don't give you read access, and using FTP would be a waste. Note that you can password protect individual files by editing .htaccess, using the Require (and accompanying) directives in a Files or FilesMatch section. See...
Top