Search results

  1. M

    PHP PM send message help

    You still haven't clearly described the behavior you get, including whether there are any error messages and, if so, what they are. The code is also improperly indented, making it hard to read. However, there is one obvious error: $query = $dbh->prepare("SELECT id FROM users WHERE username =...
  2. M

    PHP mysqli_real_escape_string PDO equivilent

    What site is that? Make sure you read the PDO prepared statement documentation on the PHP site; it explains this right off the bat. Only prepared statement parameters are invulnerable to SQL injection because they are sent out-of-band. Since only simple values can be parameterized, other parts...
  3. M

    Iframes

    If you're having this much trouble with basic HTML and understanding people's responses, you need to go study. Here are some links to get you started: HTML tutorial - The Basics HTML Dog How To Create Dev.Opera
  4. M

    Forward all email?

    Next time, try searching the forums. This question has already been answered.
  5. M

    Profile pic feature for my login script - NO CODES NEEDED

    Exactly why prepared statement parameters are so useful. If you use them, there's nothing to forget, security-wise.
  6. M

    hosting account linking to forum account

    Make sure you're following the right steps to link accounts. If you are, open a ticket, which will create a thread in the Community Support - Free Hosting forum (which is the correct forum for this issue, not here in programming help). If an admin needs to look into it, someone will escalate the...
  7. M

    Inline Editing.

    What it looks like is that you don't make the content element editable until after the click event, so the necessary event handler that switches from an element to and edit field is never invoked. Either make the element an editable sooner, or refire the click event.
  8. M

    Profile pic feature for my login script - NO CODES NEEDED

    Your script is open to SQL injection. Switch to using PDO and prepared statements. The DB connection should be placed in a function to isolate DB user credentials and improve reliability and security. Read "Writing MySQL Scripts with PHP and PDO" for more.
  9. M

    Php coding help

    In addition to variable functions, there are call_user_func, call_user_func_array and even ReflectionMethod. Just be careful not to set the function name directly from user input, else you'll be opening your script to injection. $allowedThings = array_flip(array('aFunc', 'anotherFunc', 'yaf'...
  10. M

    Failover

    @spadija: note that it is possible to have a failover server, just not on X10. You can run a heartbeat server on the DNS server, and change the address for the site name when the main server stops sending a beat. @icedhabbo: triad73 isn't talking about restoring data after a server crash, he's...
  11. M

    Use "USE" in php

    In PHP, you use include, include_once, require or require_once. However, PHP doesn't have packages as Perl does. Read the PHP manual pages or search the web for more.
  12. M

    MySQL Problem

    If you had searched the forums, you would have found a tutorial explaining how to integrate MySQL and ASP.Net on X10.
  13. M

    Javascript : Small Script...Big Headache

    Does your actual page have a line break in your inline submit handler? If so, checkSubmit will never be called, because the newline character is a statement separator; the return and checkSubmit() are separate statements. Other than that, I don't know what to tell you, since you didn't describe...
  14. M

    mySql : Select into file

    You'll probably get better performance and reduce resource usage if you write directly to the file, rather than appending to a string as you iterate over result rows. There will be much less allocation and reallocation of memory. $result = $dbh->query($sql)...
  15. M

    mySql : Select into file

    There are two copies of each column because the default fetch mode for PDOStatement is to return an array indexed both by column number and name (mode PDO::FETCH_BOTH). Call PDOStatement::setFetchMode() to set the fetch mode to PDO::FETCH_NUMERIC, PDO::FETCH_NAMED or PDO::FETCH_ASSOC. More info...
  16. M

    Help with draggable layers javascript

    The same thing that was there originally, though you can cut the dragapproved and other unnecessary stuff. It's possible, but using the class is more extensible. Should you wish to add additional style or test whether an object is currently being dragged, it's much easier with the class...
  17. M

    Help rewriting /index.php to /index

    As an alternative, you can turn on content negotiation with the Apache config line Options +MultiViews.
  18. M

    Help with draggable layers javascript

    As it says in the sig, Did you fill out the body of moveit()?
  19. M

    Help with draggable layers javascript

    If you're not very skilled at JS, the first thing you should do is see if someone has already written a script that does what you want. Alternatively, I did think of another, simpler approach that will work for all but iframes in the object being dragged: when dragging, bump up the z-index of...
  20. M

    Python calling another appliction

    Command line programs can be called with the subprocess module. However, it's likely to be disabled on X10 for security purposes, if that's where you're running the Python script.
Top