- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 1384 Articles for PHP

Updated on 14-Mar-2023 16:18:27
The LAMP environment is widely used for web development, and it is an acronym for Linux, Apache, MySQL, and PHP. This environment is an open-source platform that is easy to use and deploy. PDF format is commonly used for sharing and exchanging documents over internet. However, generating PDF documents can be a challenging task in a LAMP environment, especially when converting XHTML documents. In this article, we will explore different methods used for PDF generation from XHTML in a LAMP environment. What is XHTML? XHTML stands for Extensible Hypertext Markup Language, which is a markup language that is used to ... Read More 
Updated on 14-Mar-2023 16:14:56
Introduction Xvfb stands for "X Virtual Frame Buffer" which is used to create a virtual display in memory without any attached physical display device. It allows running graphical applications without any actual graphics hardware. PHP is a server-side scripting language widely used for web development. In this article, we will discuss how we can use Xvfb with PHP to run graphical applications in headless mode. Why do we need Xvfb with PHP? PHP is a server-side scripting language and doesn't provide any direct support for graphics and user interfaces. Most of PHP-based web applications are built on top of popular ... Read More 
Updated on 17-Feb-2023 10:41:13
A server-side scripting language that is frequently used for web development is called PHP (Hypertext Preprocessor). The server runs PHP code, which produces HTML, CSS, and JavaScript, which are then transmitted to the client's browser for rendering. Before the HTML is transmitted to the client's browser, PHP code is embedded in it and executed on the server. To add more values to an array on a button click using PHP, you can use a form with a button that, when clicked, sends a request to a PHP script that adds the new value to the array. Approaches When using PHP, ... Read More 
Updated on 31-Jan-2023 18:08:35
In this article, we will learn In terms of ease of learning for new programmers, how does Python compare to PHP? Comparison of Uses and Easiness: Python vs PHP Python Python is a programming language that can be used for a variety of purposes hence it is a general-purpose programming language. Artificial intelligence, machine learning, web development, data analytics, game development, and financial predictive models are just a few of the applications. Python is used by almost all current technology organizations, including Google and Netflix. Python is a popular programming language among data scientists for data cleaning, visualizing, and creating ... Read More 
Updated on 10-Jan-2023 17:38:13
SQL injection is a type of cyber attack that allows attackers to execute malicious SQL statements on a database. These statements can be used to manipulate data, retrieve sensitive information, or even delete entire databases. It is one of the most common and dangerous types of web vulnerabilities, and it can affect any website or web application that uses a SQL database. In this article, we will cover the basics of SQL injection, how it works, and how to prevent it. We will also provide an example of a basic SQL injection attack and show how to mitigate it. What ... Read More 
Updated on 01-Sep-2022 07:21:44
The middleware is a protection layer in laravel. It helps to filter the http request coming down. It acts as the middle layer between request and response. For example − Laravel will check if the user logged in is an authenticated user or not. The request has to pass through the middleware .If it's an authenticated user the user will get a pass otherwise it will be logged out. Another example of using middleware is age restriction. If the user is failing under a certain age range, allow the user to get a few pages otherwise not. The middleware folder ... Read More 
Updated on 01-Sep-2022 07:20:11
Blade is a template engine that helps you to build your view display in laravel. It also helps you to use php code inside the template. The blade templates are saved as filename.blade.php and are stored inside resources/views/ folder. To understand the above question let us create a view calling the blade template. Example 1 Inside routes/web.php I have created the following route that is calling the view hello with data ['mymsg' => 'Welcome to Tutorialspoint']. Route::get('hello', function () { return view('hello', ['mymsg' => 'Welcome to Tutorialspoint']); }); The hello.blade.php is inside resources/views folder − {{$mymsg}} ... Read More 
Updated on 01-Sep-2022 07:17:27
To get all the field values from the html form you can make use of the Request class. The class Illuminate\Http\Request; has to be included in your controller.
Example 1
This example shows the student registration form and it has fields like name, email, age and address.
Student Form
@if (count($errors) > 0)
@foreach ($errors->all() as $error)
{{ $error }}
@endforeach
@endif
Student Registration
Name
Email
Age
Address
The StudentController class is as follows −

Updated on 01-Sep-2022 07:14:03
To validate data you can make use of the Validation class. The validation helps to validate data as well as to display error messages to the user. Example 1 In the example below the make() method is used. The first argument is the data to be validated and the second is the rule applied on the data : name. $validator = Validator::make( array('name' => 'Disha'), array('name' => 'required|min:5') ); As per the above the name assigned is Disha. As per the rule the name is mandatory and the minimum characters required is 5. ... Read More 
Updated on 01-Sep-2022 07:11:53
To validate data you can make use of the Validation class. The validation helps to validate data as well as to display error messages to the user. To get the exact words to validate you can make use of Rule::in method available with laravel. Using Rule::in method whatever the values provided by this rule has to be matched otherwise it will fail. Example 1 working with Rule::in method To work with Rule::in method you need to include the class : use Illuminate\Validation\Rule; or use Rule; $input = [ 'category' => ['ABC', 'XYZ'], ]; Validator::make($input, [ ... Read More Advertisements