Object oriented programming:- Object oriented programming is invokes the use of classes to organize the data and structure of an application. Oops started with php to become feasible with the release of PHP4, but mainly its came into own with PHP5. Now, as the php boom is growing, PHP6 and PHP7 also takes a important place with new features of Oops.
Category: php
How to create a login form without using database and display data on a next page in php
Step 1:- First create a page login.php in your specified folder as follow:- #login.php <html xmlns=”http://www.w3.org/1999/xhtml”> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ /> <title>Untitled Document</title> <link rel=”stylesheet” type=”text/css” href=”css/style.css” /> <script type=”text/javascript”> function formvalidator(){ // Make sure that all of the form variables, etc are valid var f = document.outlet_search; var atpos =f.email.value.indexOf(“@”); if(f.name.value.length<1){ alert(‘Name should be atleast 2 words.’); f.name.focus(); return false; } if (atpos<1 ) { alert(“Not a valid e-mail address”); return false; …
How to send mail in php
Step 1:- Create a html form to take input from user as follow:- #INDEX.PHP <!DOCTYPE html><html xmlns=”http://www.w3.org/1999/xhtml”><head> <title></title></head><body> <div style=”width:600px; margin:0 auto;”> <form action=”mail.php” method=”get”> <table> <tr> <td>Customer Name </td> <td> <input type=”text” id=”CustName” name=”CustName” required /> </td> </tr> <tr> <td>Customer Mail ID </td> <td> <input type=”text” id=”toMailID” name=”toMailID” required/> </td> </tr> <tr> <td>Attach file</td> <td> <input type=”file” name=”upload” id=”upload” /> </td> </tr> <tr> <td> </td> <td> <input type=”submit” value=”Submit” /> …
How to create connection in php
PHP CONNECTION Step 1:- Make a database in PHPMyAdmin with name phpconnection. Step 2:- Now create a page with name checkConnection.php as follow.. # checkConnection.php <?php $hostname = ‘localhost’; $database = ‘phpconction’; $username = ‘root’; $password = ”; $conn = mysqli_connect($hostname, $username, $password, $database); if($conn){ echo ‘connection is created’; }…
The New Era of PHP: Using Composer for Dependency and Package Management
“A lot of PHP libraries, frameworks, and components are there to choose from and your project will likely use several of them — these are called project dependencies. Till now, PHP did not have a good way to manage all these project dependencies and even if you managed them manually, you still had to worry about autoloaders.Composer is not a package manager though it deals with “packages” or libraries, but it manages them on a per-project basis, installing them in a directory inside your project. By default it will never…
Now PHP 7 Moves Full Speed Ahead
Next major version of server-side Web development language planned for release in the next year.. PHP 7, a major update to the server-side scripting language due next year, will offer performance improvements and more capabilities, along with deprecation of some existing features.The release will be anchored by performance enhancements derived from the phpng branch of the PHP tree. Officials from PHP tools vendor Zend Technologies discussed the progress of phpng and PHP 7 at the company’s ZendCon conference in Silicon Valley this week. “[The upgrade is] really focused on helping…
PHP Developers, Take Note: Zend Server 8 Arrives On The Amazon Cloud
Zend Technologies today is announcing the arrival of the latest version of the Zend Server application platform on the Amazon Web Services (AWS) Marketplace.That should come as good news to developers who work in PHP and prefer to run their applications on the biggest public cloud around.Zend Server 8 is a PHP application server with tools for deploying, monitoring, and debugging PHP-based apps. PHP, for its part, is one of the most popular server scripting languages on the Internet, used on more than 80 percent of Web servers.The version coming…
How to Push your Drupal Site’s Events to your Phone with Pushover
In this article I am going to show you how you can integrate Pushover with your Drupal site. I will illustrate a couple of examples of how you can use Pushover to notify yourself as soon as something happens on your site. The code I write in this article is also available in this repository so you can just clone that if you want to follow along. What is Pushover? Pushover is a web and mobile application that allows you to get real time notifications on your mobile device. The way it works is…
Simple blog PHP script for your blog
If you need a blog on your website, you’re at the right place. Simple Blog PHP script could be easily installed into your existing(current) website. Your website visitors can read your post and leave comments in it. Any publication of a new comment is spam protected using captcha verification. Administrators have their own password protected page, where they can create, edit or delete their posts. Simple Blog PHP supports these features: any language support simple css setup through admin with unlimited visual combinations under your control option to use meta title…
20+ PHP Best Practices That You Must Follow
This article outlines essential best practices for PHP, one of the most widely used programming languages. Many beginners and even experienced developers overlook these practices, which can impact code quality and job opportunities. Adopting these practices will help you become a professional developer and write cleaner, more efficient code. 1. Maintain Proper Code Documentation Proper documentation is critical for code maintainability. Many developers skip writing meaningful comments due to laziness, but this practice helps others understand your code and serves as a reminder for yourself when revisiting it later. For…
