Jump to content
#StayAtHome ×


  • Content Count

  • Joined

  • Last visited

Everything posted by ajoo

  1. Hi all ! I was told by someone today that it's a bad idea to have more than 7 columns in a table in a MySql database ???! Is that true? I am using tables which have about a 130 columns and I was told that that was a bad idea and would cause the application to crash once the number of simultaneous users exceed a certain number , namely about a 100. I request the Guru's to kindly clarify on this. Thanks all !
  2. MacGyver is right but Thanks none the less, gives me something else to check and read about.
  3. yes that's exactly correct. yes I don't want someone to go to secound.php from anywhere else except the hyperlink so i guess sessions is the best way to ensure it. Maybe You can suggest something else. Thanks
  4. yea hi ! ok so this one file is not an included file. It's a PHP file, say second.php which is invoked by a hyperlink on the main webpage index.php. Now i don't want to give a direct access to it so i asked if something similar like defining a constant and then checking for it in the second.php , once the hyperlink was pressed in index.php, could be used to prevent direct access to this file second.php. I am actually thinking of using sessions to prevent direct accesss to this one - (a hyperlink invoked file). Thanks.
  5. Hey thanks ! yes I am now trying and using the define to define a constant. However what about a file that I have to access using a href defined hyperlink? What's the way to prevent direct access to that file other than what you suggested of putting the files into a folder other than the root. Please suggest something. Thanks !
  6. Hi, searching for this very common question as in subject, I CAME ACROSS THE FOLLOWING QUESTION:- I have a php file which I will be using as exclusively as an include. Therefore I would like to throw an error instead of executing it when it's accessed directly by typing in the URL instead of being included. Basically I need to do a check as follows in the php file: if ( $REQUEST_URL == $URL_OF_CURRENT_PAGE ) die ("Direct access not premitted"); Is there an easy way to do this? AND THIS ANSWER:- The easiest way is to set some variable in the file that calls include, such as $including = true; Then in the file that's being included, check for the variable if (!$including) exit("direct access not permitted"); AND THESE COMMENTS:- 2 This is dangerous if register_globals is on. – jmucchiello Jan 3 '09 at 18:51 11 PHP is dangerous if register_globals is on. – David Precious Jan 3 '09 at 18:56 MY QUESTION IS that please can someone explain why and how this is a dangerous menthod and if it should be used or not. I have actually used this technique, There is a php file which is accessed as a hyperlink from the index file. When I use that link, it gives me an error saying that I cannot access that file directly. So does that mean that this technique won't work on hyperlinked files? If not then what is the best way to ensure that hyprelinked files are not accessed directly? Thanks a lot everyone on the forum.
  • 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.