Jump to content

ManiacDan

Staff Alumni
  • Posts

    2,604
  • Joined

  • Last visited

  • Days Won

    10

Posts posted by ManiacDan

  1. Your "top" div has three children: top left corner, top border, top right corner.  The top border is set to 25px wide.

     

    OUTSIDE of that, you have the image.  The image's width has no effect on your top border width.

     

    -Dan

  2. It doesn't seem like you understand what the include/require functions actually do.  When you include a PHP file, basically what happens is PHP copies the contents of the file right into the script that's including them.  Include/require will ALWAYS succeed if the file is present, the only question you should have is whether or not the PHP inside the included file is valid.  This is something you have to ensure by writing good code in your include files, not by wrapping them in a validator.

     

    Include files shouldn't "return" anything to the parent file, because they're designed to operate as if the code is IN the parent file to begin with.

     

    -Dan

  3. What he means is, PHP by default doesn't allow two queries to be processed in the same string specifically because developers are generally not smart enough to properly sanitize their incoming user data, so a user puts "'; DROP TABLE `users`;#" inside the "login" form and your site suddenly disappears.  PHP has a lot of "quirks" to protect the dumber members of the web dev community.

     

    You will have to put your queries in an array and run them one at a time.

     

    -Dan

  4. Why would you expect it to?  What good would it do under normal circumstances to be able to grab the style of the HTML element out of POST?  The whole purpose of the functionality is to allow users to post values into named fields.  The ID (which you assigned in the HTML, cannot change, and should be associated with the name) isn't something you should be wasting bandwidth transmitting.

     

    -Dan

  5. That's not an apostrophe, that's a "backtick."  An apostrophe and a single quote are the same thing.

     

    That being said, you wrap mysql column and table names in backticks to ensure that they're recognized as what they are, this is how you can use a column name like `date`.

     

    You don't need them, but technically it's the correct way to write SQL.

     

    -Dan

  6. You did a print_r($_POST) and you got array() and that's it?  Then it's empty.

     

    Also note that print_r($_POST) should ALWAYS give you an array, the key is to look at the output and see what $_POST['ques'] is.  I'm guess it's not an array or it doesn't even exist.

     

    -Dan

  7. Assuming you haven't overridden any settings, sessions are stored in a temporary file on your server's file system.

     

    The session file is named after the user's session ID, which is stored either (a) in the user's PHPSESSID cookie, or (b) in the URL.

     

    When the user visits the site, his cookie/URL are analyzed and the proper file is loaded into memory as $_SESSION.

     

    Check the URL you're using.  If there's a 32-character hexadecimal code there that you don't recognize, it's your session ID, and anyone who uses that URL will get the same session as you.  This is why URL-based sessions are frowned upon and rarely used.

     

    If there's no session ID in the URL, then you have a cookie called PHPSESSID on your browser.  It SHOULD be deleted once all your browser windows are closed, but it won't necessarily.  You'll have to delete the cookie by hand to clear your session.

     

    -Dan

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.