PHP - Moved: Wide Space In Between Contents Using <td> In Php Code
This topic has been moved to HTML Help.
http://www.phpfreaks.com/forums/index.php?topic=321431.0 Similar TutorialsHi All, I'm having a major mind blank, and can't find anything in the previous posts resolving what I'm after. I'm setting $searchtext = $_POST['searchtext']; I want to check $seachtext is not null. I've seen isset($searchtext) but it doesn't solve my problem. Basiclaly; I want an if statement to say if(isset($searchtext)) {......} Thoughts? This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=332328.0 Greetings all, I like to make a config.php file and place it outside my document root for security. I do this all the time. Then just inlcude the config in any file that I need information for. include('../includes/config.php'); This works most of the time for any DB connection information a piece of code might need. However, sometimes I like to place all my functions in a file called functions.php to keep them separate and have a single place to work with them. I have not done any coding in about two years and just started back and for the life of me I can't get any connection attempt inside any of my functions to use the DB connection info from the config.php even if I include the file right inside the functions.php at the top. Even when I put all my functions inside the config file itself they still have no access to the connection vars. I remember that I used to be able to use a global so some type to do this. The important part is getting DB connection access to any functions that I write. Here is an example of a plain config that I might start with; //* Database connection information.. *// $DBHost="localhost"; //* Database Hostname $DBName="some_db"; //* Database Name $DBUser="some_user"; //* Database Username $DBPass="some_pass"; //* Database Password $db = mysql_connect($DBHost, $DBUser, $DBPass); mysql_select_db($DBName); Can someone show me where I'm going wrong and the modern excepted method of doing this? I would greatly appreciated it!! Thank you. What is the best practice for using site-wide constants in a class? E.g. COMPANY_NAME is set in a config file and used on many pages. How would it be best to use this in a class. I'm guessing just calling COMPANY_NAME anywhere in the class would not be considered best practice. Thanks. I have a table with postcodes in it. At some point some of the codes will be entered with spaces (LA12 5TH) and some without (LA17HU) what i need is a function to check if there is a space, if not - count back 3 characters from the end of the string and insert a space. I don't know which string function to use - looked at pad but that seems to be for either end of string and not the middle - any ideas? This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=352862.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=351710.0 This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=334386.0 This topic has been moved to Beta Test Your Stuff!. http://www.phpfreaks.com/forums/index.php?topic=309601.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=349890.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=323503.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=354376.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=345912.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=355529.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=330152.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=357903.0 This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=321176.0 This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=323161.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=317538.0 This topic has been moved to PHP Freelancing. http://www.phpfreaks.com/forums/index.php?topic=322196.0 |