Search results

  1. M

    PHP write variables to file

    Another option is to use heredoc syntax for the file content. Note that, as written, you've got quite a serious code injection problem. It can be tricky to sanitize the input properly, which is why generating PHP containing user input is a bad idea. One alternative is to generate an INI file...
  2. M

    Email Forwarding to PHP

    It should be possible. Check some of the threads for specifics, such as "How to automatically send a reply mail using PHP?". In particular, make sure you're not using the script as the command but are instead using the PHP binary and passing the script as an argument.
  3. M

    Registration Script Optimization

    Closer. The registration script might look something like: <?php $userForm = new UserForm; if (($errors = $userForm->validate($_POST))) { # UserForm::display takes keyword arguments that affect display. $userForm->display(array('errors' => $errors)); ... } else { # the...
  4. M

    help putting PHP in my JAVASCRIPT

    You used a MIME type of "application/x-javascript", which is not the current standard value and not recommended. "application/javascript" doesn't work in IE ≤ 8 when used as the value of a "type" attribute of a <script> tag: <script type="application/javascript"> /* IE ≤ 8 won't evaluate this...
  5. M

    CSS Problem

    "It won't work" tells us nothing. When asking for help, tell us what you want (or expect) to happen and what actually happens, including any error messages. When asking about code, include a minimal sample case. Though it doesn't work, you did include a link to a live page, which is a necessity...
  6. M

    Registration Script Optimization

    Note PDOStatement::bindValue is a library function. Regarding point 2, PDOStatement::execute can take an array of values to bind to query parameters. As for a better way to structure user account creation, the professional way would be to separate different concerns into different modules...
  7. M

    help putting PHP in my JAVASCRIPT

    Don't use blinking text; it's terrible for usability. The BLINK element was originally a bad joke. Read on for solutions to the problems with the sample code not to fix blinking text but to fix your skills. Note the generated HTML content: <script...
  8. M

    How to program a 301 redirect to start a domain with www.

    A search for "rewrite www" turns up some answers.
  9. M

    .htaccess rewrite engine help

    REST principles should still underly the app. As for hiding the page URI, why? Security through obscurity? That should work. Note that anything that begins with "grab" (e.g. "grabble?file=my.zip") will be rewritten to the download script, which may or may not be a problem. For downloads, I'd...
  10. M

    Simple Actionscript Syntax question

    How do you know? Do you mean if you browse to "CompSummary.php?url3=123456" in a browser, you don't get the message that url3 doesn't exist? You apparently haven't read my sig, nor the site from a previous link on posting sample code as you haven't written a complete sample. After filling out...
  11. M

    Failed file upload

    Not with the amount of information you've given. When asking for help, include a description of what you expect to happen, what actually happens (including exact error messages, if any), minimal sample code and a link to a live page (if applicable). See the links in my sig for more on asking...
  12. M

    .htaccess rewrite engine help

    This can't work because a URI identifies a single resource at any point in time (though that resource may have multiple representations, and multiple URIs may identify that resource). The underlying mechanism that defines this is called REST (see also "How I Explained REST to My Wife"). Not only...
  13. M

    Having problems starting my site...

    cPanel is for site administration and isn't required for web site creation. You can use it to upload and edit files, but there are other tools for that. If you're having problems, describe what you expect and what you get (including any error messages), and include sample code. When asking...
  14. M

    If IE Redirect

    Note that beyond simply redirecting, you can use conditional comments to create content or styling that applies only to some versions of IE.
  15. M

    an error that is not

    Because it's unnecessary. See Dijkstra's "Go To Statement Considered Harmful" and David Tribble's "Go To Statement Considered Harmful: A Retrospective". To wit, PHP is a high level language, and branches, loops and recursion mean goto statements are largely superfluous. You say that like...
  16. M

    .htaccess rewrite engine help

    The current virtual host setup requires you to set RewriteBase. In your document root, it should be "RewriteBase /". Your question doesn't make much sense. You say you want "http://mysite.com/everythingelse/blah.php" and "http://mysite.com/index.php" to be rewritten to "http://mysite.com"...
  17. M

    Interesting effect with the canvas element and CSS

    Without sample code, your question is imperfect. The problem description is too vague to address.
  18. M

    Simple Actionscript Syntax question

    Is the undefined variable problem in the Flash movie, or in the PHP script? If the latter, why have you not shown sample PHP code?
  19. M

    Why did you suspended my account ? WE ARE NOT RACISTTTTTTTTTTTTTTTTTTTTTTTT

    Just because someone doesn't agree with you doesn't mean they're misguided or stupid. You'll never get far if you don't understand others' point of view, and understanding others doesn't mean you have to agree with them. Since opinions generally arise out of what one experiences (including...
  20. M

    Why did you suspended my account ? WE ARE NOT RACISTTTTTTTTTTTTTTTTTTTTTTTT

    In this case, the site was suspended not for racism but bigotry. It unfairly singled out certain groups (Muslims and non-Europeans) for criticism. People of any ethnicity can be racist. The site wasn't suspended to prevent you from posting your opinions. You indeed do have the right to state...
Top