The require() and require_once() functions perform same work. Both functions will include and evaluates the specific file while executing the code. if include() is not able to find a specified file on location at that time it will throw a warning however, it will not stop script execution. For the same scenerio require() will throw…
Read MorePHP is an HTML-embedded server-side scripting language. The goal of the language is to allow web developers to write dynamically generated pages quickly. NTC Hosting offers its clients high quality PHP and HTML hosting services. Our servers are configured so as to ensure maximum performance for both your HTML and PHP-based applications and the non-interruptible…
Read MoreInheritance is a well-established programming principle, and PHP makes use of this principle in its object model. This principle will affect the way many classes and objects relate to one another. For example, when you extend a class, the subclass inherits all of the public and protected methods from the parent class. Unless a class…
Read MoreThere are some certain ways to send your information or data to the PHP page- Using Form Methods – Get & Post Using Cookies & Session Using Query String / URL Rewriting Using Hidden form fieldForm MethodsThe GET Method: The GET method sends information separated by the ? Operator.Example: http://www.xyz.com/home.html?city=Gurgaon Please note that the GET…
Read MoreString functions are the most important functions frequently used in PHP. String is the sequence of characters, like “Let’s learn String functions”. There is no installation required to use string function. Example <?php $name = “Hirdesh Bhardwaj”; print($name); ?> String Concatenation Operator To concatenate two string variables together, we use the dot (.) operator −…
Read MoreWe need to create an HTML form that allows you to choose the file to be uploaded. Note: please make sure you have form method type is post and enctype=”mutipart/form-data” to to handle file uploading process successfully. HTML Code <form enctype=”multipart/form-data” action=”process.php” method=”POST”> Choose File : <input name=”myfile” type=”file” /> <input type=”submit” value=”Upload” /> </form>…
Read MoreAlmost in every web application sending automated email by system is the common requirement. So, it’s very common and important part that must be known by developer. The simple example, when a visitor to your website fills out a enquiry form. mail function return a boolen value, return true if email sent successfully, false otherwise…
Read MoreThe Include() and require() statements are used to insert codes written in other files, in the flow of execution. The main of using include and require functions to integrate one page code or content into another page. You can maintain usually some repeated functionality in the form of PHP file and finally you can call…
Read MoreNumeric Data Types: INT (Integer): Int data type represents an integer of normal size. So simply it can used to store numeric value. There are also BIGINT, MEDIUMINT, SMALLINT and TINYINT which represent different range of integer values. DECIMAL: Decimal data type represents numbers with specific floating values. Maximum permitted value is 65 and maximum…
Read MoreDifference Between while and do…while Loop: With a while loop, the condition to be evaluated is tested at the beginning of each loop statement, so if the conditional expression evaluates to false, the loop will never be executed. With a do-while loop, on the other hand, the loop will always be executed once, even if…
Read More