Most answered questions in PHP

0 votes
1 answer

What is the best way to allow plugins for a PHP application?

Hello @kartik, I've used, it's an attempt to ...READ MORE

Apr 15, 2020 in PHP by Niroj
• 82,880 points
511 views
0 votes
1 answer

I am trying to run following command But I end up with an error :

Hello Nishant, You are getting this error because your ...READ MORE

Apr 9, 2020 in PHP by Niroj
• 82,880 points
501 views
0 votes
1 answer

How to include a PHP variable inside a MySQL statement?

Hii, You can try this: $query="SELECT * FROM CountryInfo ...READ MORE

Apr 9, 2020 in PHP by Niroj
• 82,880 points
15,783 views
0 votes
1 answer

Error:Lost connection to MySQL server at 'reading initial communication packet', system?

Hello, You have to follow the below steps: bind-address ...READ MORE

Apr 9, 2020 in PHP by Niroj
• 82,880 points
20,369 views
0 votes
1 answer

How to log in to phpMyAdmin with WAMP?

Hello @kartik,  Try-Username: root Password: (No password set). Sometimes it doesn't ...READ MORE

Apr 9, 2020 in PHP by Niroj
• 82,880 points
6,287 views
0 votes
1 answer

How can I get ID of the last updated row in MySQL?

Hello @kartik, Suppose, item_id is an integer identity column in items table ...READ MORE

Apr 9, 2020 in PHP by Niroj
• 82,880 points
11,319 views
0 votes
1 answer

What is the use of the @ symbol in PHP?

Hello @kartik, The @ symbol is the error control operator ("silence" or "shut-up" ...READ MORE

Apr 9, 2020 in PHP by Niroj
• 82,880 points
11,367 views
0 votes
1 answer

SQL injection that gets around mysql_real_escape_string()?

Hello @kartik, Consider the following query: $iId = mysql_real_escape_string("1 ...READ MORE

Apr 9, 2020 in PHP by Niroj
• 82,880 points
3,637 views
0 votes
1 answer

How to get the client IP address in PHP ?

Hello, Here is a code sample of a good ...READ MORE

Apr 8, 2020 in PHP by Niroj
• 82,880 points
6,479 views
0 votes
1 answer

How to pass an array within a query string?

Hello, Submitting multi-value form fields, i.e. submitting arrays ...READ MORE

Apr 8, 2020 in PHP by Niroj
• 82,880 points
11,740 views
0 votes
1 answer

How to get xdebug var_dump to show full object/array?

Hello. These are configurable variables in php.ini: ; with ...READ MORE

Apr 7, 2020 in PHP by Niroj
• 82,880 points
3,139 views
0 votes
1 answer

How can I handle the warning of file_get_contents() function in PHP?

Hello @kartik, This is fairly simple: if (!$data = ...READ MORE

Apr 7, 2020 in PHP by Niroj
• 82,880 points
10,434 views
0 votes
1 answer

What does double question mark (??) operator mean in PHP?

Hello, It's the "null coalescing operator", added in ...READ MORE

Apr 2, 2020 in PHP by Niroj
• 82,880 points
7,027 views
0 votes
1 answer

Composer install error - requires ext_curl when it's actually enabled?

Hello, on php7 run for example: > sudo apt-get ...READ MORE

Apr 2, 2020 in PHP by Niroj
• 82,880 points
15,333 views
0 votes
1 answer

Error:PDOException SQLSTATE[HY000] [2020] No such file or directory in php?

Hello, I checked php -i | grep pdo and noticed ...READ MORE

Apr 2, 2020 in PHP by Niroj
• 82,880 points
1,150 views
0 votes
1 answer

How to prevent XSS with HTML/PHP?

Hello, HTML Encoding htmlspecialchars will convert any "HTML special characters" ...READ MORE

Apr 1, 2020 in PHP by Niroj
• 82,880 points
898 views
0 votes
1 answer

How to merge two arrays while keeping keys instead of reindexing in php?

Hello, Considering that you have $replaced = array('1' => ...READ MORE

Apr 1, 2020 in PHP by Niroj
• 82,880 points
2,435 views
0 votes
1 answer

What are the best way to allow plugins for a PHP application?

Hii, Here is an approach I have  used, it's ...READ MORE

Apr 1, 2020 in PHP by Niroj
• 82,880 points
575 views
0 votes
1 answer

How to convert an image to base64 encoding?

Hello @kartik, You can also do this via ...READ MORE

Apr 1, 2020 in PHP by Niroj
• 82,880 points
3,552 views
0 votes
1 answer

How to send email using php?

Hello @kartik 1.) Download PHPMailer, open the zip file ...READ MORE

Apr 1, 2020 in PHP by Niroj
• 82,880 points
1,021 views
0 votes
1 answer

How to install a specific version of package using Composer?

Hello, Just use php composer.phar require For example : php ...READ MORE

Apr 1, 2020 in PHP by Niroj
• 82,880 points
3,342 views
0 votes
1 answer

How to check if php session is already started or not?

Hello kartik, Use session_id(), it returns an empty string ...READ MORE

Apr 1, 2020 in PHP by Niroj
• 82,880 points
5,065 views
0 votes
1 answer

Error:“Notice: Undefined variable”, “Notice: Undefined index”, and “Notice: Undefined offset” using PHP

Hello @kartik, The best way for getting input string is: $value ...READ MORE

Apr 1, 2020 in PHP by Niroj
• 82,880 points
36,794 views
0 votes
1 answer

How to get thumbnail of youtube video from youtube API?

Hii @kartik, If you want the biggest image ...READ MORE

Apr 1, 2020 in PHP by Niroj
• 82,880 points
1,410 views
0 votes
1 answer

What is the use of $_REQUEST variable in php?

Hii @kartik, The $_REQUEST variable is used to read the ...READ MORE

Mar 27, 2020 in PHP by Niroj
• 82,880 points
2,744 views
0 votes
1 answer

How can you upload a file using PHP?

Hello, To upload a file by using PHP, ...READ MORE

Mar 27, 2020 in PHP by Niroj
• 82,880 points
611 views
0 votes
1 answer

What are the differences between mysqli_connect and mysqli_pconnect?

Hello, mysqli_pconnect() function is used for making a persistence ...READ MORE

Mar 27, 2020 in PHP by Niroj
• 82,880 points
3,294 views
0 votes
1 answer

How to retrieve or obtain data from the MySQL database using PHP?

Hello kartik,  Actually there are many functions that  ...READ MORE

Mar 27, 2020 in PHP by Niroj
• 82,880 points
2,978 views
0 votes
1 answer

Connection with MySQL server using PHP. How can we do that?

Hey @kartik, You have to provide MySQL hostname, ...READ MORE

Mar 27, 2020 in PHP by Niroj
• 82,880 points
956 views
0 votes
1 answer

What is type casting and type juggling in php?

Hey, The way by which PHP can assign ...READ MORE

Mar 27, 2020 in PHP by Niroj
• 82,880 points
6,794 views
0 votes
1 answer

What is meant by passing the variable by value and reference in PHP?

Hello, When the variable is passed as value ...READ MORE

Mar 27, 2020 in PHP by Niroj
• 82,880 points
2,913 views
0 votes
1 answer

What is Php Mysql Database? How php connect to database?

Hello kartik, MySQL is the most popular database ...READ MORE

Feb 25, 2020 in PHP by Dey
885 views
0 votes
1 answer

How to shrink Navigation menu or bar on Scroll?

Hey, You can follow the steps below in ...READ MORE

Feb 19, 2020 in PHP by varun
3,452 views
0 votes
1 answer

Error: Global Variable is not accessable to local function

Hey kartik, A variable declared outside a function has a ...READ MORE

Feb 19, 2020 in PHP by Niroj
• 82,880 points
826 views
0 votes
1 answer

Complete PHP form with proper validation and syntax

Hey @kartik, It's quite simple to have php ...READ MORE

Feb 19, 2020 in PHP by Niroj
• 82,880 points
1,257 views
0 votes
1 answer

What is Php json?

Hii @kartik, JSON stands for JavaScript Object Notation, ...READ MORE

Feb 14, 2020 in PHP by Niroj
• 82,880 points
443 views
0 votes
1 answer

How to validate E-mail and URL of Php form?

hey, The code below shows a simple way ...READ MORE

Feb 13, 2020 in PHP by manish
1,992 views
0 votes
1 answer

What is a Cookie? How to create Cookies With PHP?

A cookie is often used to identify ...READ MORE

Feb 13, 2020 in PHP by Niroj
• 82,880 points
3,410 views
0 votes
1 answer

How can you display the error messages?

Hey, In the HTML form, we add ...READ MORE

Feb 13, 2020 in PHP by Niroj
• 82,880 points
2,918 views
0 votes
1 answer

How to Validate Form Data With PHP?

Hey @kartik, The first thing we will do ...READ MORE

Feb 13, 2020 in PHP by Niroj
• 82,880 points
2,883 views
0 votes
1 answer

How can we avoid my php form from hacking?

Hii @kartik, If you want to know php ...READ MORE

Feb 13, 2020 in PHP by Niroj
• 82,880 points
2,278 views
0 votes
1 answer

What are the vulnerability related to PHP Form?

Hii, The $_SERVER["PHP_SELF"] variable can be used by ...READ MORE

Feb 13, 2020 in PHP by Niroj
• 82,880 points
2,689 views
0 votes
0 answers

What is PHPSESSID?

I'm experimenting with cookies. I also don't ...READ MORE

Aug 8, 2022 in PHP by narikkadan
• 63,420 points
1,055 views
0 votes
0 answers

getenv() vs. $_ENV in PHP

What is the distinction between $_ENV and ...READ MORE

Aug 8, 2022 in PHP by narikkadan
• 63,420 points
1,075 views
0 votes
0 answers

How to make a nice "date picker" in PHP?

As I play about with MySQL and ...READ MORE

Aug 8, 2022 in PHP by Kithuzzz
• 38,010 points
1,252 views
0 votes
0 answers

Interface or an Abstract Class: which one to use?

Could you please explain when I should ...READ MORE

Aug 8, 2022 in PHP by Kithuzzz
• 38,010 points
546 views
0 votes
0 answers

How to add extra whitespace in PHP?

I was wondering if there was a ...READ MORE

Aug 8, 2022 in PHP by Kithuzzz
• 38,010 points
516 views
0 votes
0 answers

Integrating CCAvenue with php

I have never used a payment gateway ...READ MORE

Aug 8, 2022 in PHP by Kithuzzz
• 38,010 points
1,643 views
0 votes
0 answers

php records navigation

Code: <?php $host='localhost'; $user='root'; $password='root'; $database='database'; $startindex=@$_REQUEST['seek']; $db=mysql_connect($host, ...READ MORE

Aug 8, 2022 in PHP by Kithuzzz
• 38,010 points
303 views
0 votes
0 answers

How to increase memory limit for PHP over 2GB?

Increasing the PHP memory limit as an ...READ MORE

Aug 8, 2022 in PHP by Kithuzzz
• 38,010 points
816 views