Latest questions in PHP

0 votes
1 answer

How do I restore a dump file from mysqldump?

Hello @kartik, It should be as simple as ...READ MORE

Aug 18, 2020 in PHP by Niroj
• 82,880 points
901 views
0 votes
1 answer
0 votes
1 answer

How do I specify unique constraint for multiple columns in MySQL?

Hello @kartik, Use this: ALTER TABLE `votes` ADD UNIQUE ...READ MORE

Aug 18, 2020 in PHP by Niroj
• 82,880 points
4,343 views
0 votes
1 answer

How do you set a default value for a MySQL Datetime column?

Hello @kartik, In version 5.6.5, it is possible ...READ MORE

Aug 18, 2020 in PHP by Niroj
• 82,880 points
7,423 views
0 votes
1 answer

How to get the sizes of the tables of a MySQL database?

Hello @kartik, You can use this query to ...READ MORE

Aug 18, 2020 in PHP by Niroj
• 82,880 points
923 views
0 votes
1 answer

How to output MySQL query results in CSV format?

Hello @kartik, Using this command columns names will ...READ MORE

Aug 18, 2020 in PHP by Niroj
• 82,880 points
2,142 views
0 votes
1 answer

How to reset AUTO_INCREMENT in MySQL?

Hello @kartik, You can reset the counter with: ALTER ...READ MORE

Aug 18, 2020 in PHP by Niroj
• 82,880 points
543 views
0 votes
1 answer

How to get a list of user accounts using the command line in MySQL?

Hello @kartik, Use this query: SELECT User FROM mysql.user; Which ...READ MORE

Aug 18, 2020 in PHP by Niroj
• 82,880 points
1,280 views
+1 vote
1 answer

Error: “The zip extension and unzip command are both missing, skipping.”

Hello @kartik, Depending on your flavour of Linux ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
20,023 views
0 votes
1 answer

How to get WordPress post featured image URL?

Hello @kartik, Try this code below: <?php if (has_post_thumbnail( $post->ID ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
3,146 views
0 votes
1 answer

How to insert multiple rows from a single query using eloquent/fluent?

Hello @kartik, You can use the following approach. $data ...READ MORE

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

How foreach change original array values in php?

Hello @kartik, Do the following: foreach ($fields as $key ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
8,205 views
0 votes
1 answer

How PHP Replace last occurrence of a String in a String?

Hello @kartik, You can use this function: function str_lreplace($search, ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
2,737 views
0 votes
1 answer

Error:Undefined index: barangay in C:\xampp\htdocs\TextBlast\homepage\insert.php on line 22

Hello @ Regina, First checks whether a variable is ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
5,426 views
0 votes
1 answer

Error: Warning: Illegal string offset 'host' in ....

Hello @kartik,  Try this way: $memcachedConfig = array("host" => ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
2,818 views
0 votes
1 answer

How do I convert a PDF document to a preview image in PHP?

Hello @kartik, You need ImageMagick and GhostScript <?php $im = new imagick('file.pdf[0]'); $im->setImageFormat('jpg'); header('Content-Type: image/jpeg'); echo ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
4,315 views
0 votes
1 answer

How to get parameters from a URL string?

Hello @kartik, You can use the parse_url() and parse_str() for that. $parts = ...READ MORE

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

How to get the request parameters in symfony2

Hello @kartik, The naming is not all that ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
2,719 views
0 votes
1 answer

Fatal error: Class 'SoapClient' not found in C:\Program Files (x86)\EasyPHP-5.3.9\www\server.php on line 2

Hello @kartik, To install SOAP in PHP-7 run ...READ MORE

Aug 14, 2020 in PHP by Niroj
• 82,880 points
2,604 views
0 votes
1 answer

How to add slug to href?

Hello @aakash, You are not sending the variable ...READ MORE

Aug 11, 2020 in PHP by Niroj
• 82,880 points
905 views
0 votes
1 answer

Invalid argument supplied for foreach() on line 25. Error in my php and mysql

Hello @viven , This should be a simple fix ...READ MORE

Aug 4, 2020 in PHP by Niroj
• 82,880 points
3,906 views
0 votes
1 answer

Error:No Application Encryption Key Has Been Specified

Hello @kartik, Open command prompt in the root ...READ MORE

Jul 22, 2020 in PHP by Niroj
• 82,880 points
4,213 views
0 votes
1 answer

How to get the Last Inserted Id Using Laravel Eloquent?

Hello @kartik, Firstly create an object, Then set ...READ MORE

Jul 22, 2020 in PHP by Niroj
• 82,880 points
17,097 views
0 votes
1 answer

How Do I Get the Query Builder to Output Its Raw SQL Query as a String?

Hello @kartik, Use the toSql() method on a QueryBuilder instance. DB::table('users')->toSql() would return: select * ...READ MORE

Jul 22, 2020 in PHP by Niroj
• 82,880 points
836 views
0 votes
1 answer

How to connect to SQL Server database from JavaScript in the browser?

Hello @kartik, You shouldn´t use client javascript to ...READ MORE

Jul 21, 2020 in PHP by Niroj
• 82,880 points
23,427 views
0 votes
1 answer

Error:Cannot insert explicit value for identity column in table 'table' when IDENTITY_INSERT is set to OFF.

Hello @kartik, You're inserting values for OperationId that is an identity ...READ MORE

Jul 21, 2020 in PHP by Niroj
• 82,880 points
11,167 views
0 votes
2 answers

Error:“Cannot Connect to Server - A network-related or instance-specific error”?

Hello, The "sql server error 40" is appears mostly ...READ MORE

Aug 18, 2020 in PHP by Fantazma
• 140 points
28,415 views
0 votes
1 answer

How to select all records from one table that do not exist in another table?

Hello @kartik, You can either do like this: SELECT ...READ MORE

Jul 21, 2020 in PHP by Niroj
• 82,880 points
51,831 views
0 votes
1 answer

How to drop a table if it exists?

Hello @kartik, No. That will drop the table only ...READ MORE

Jul 21, 2020 in PHP by anonymous
• 82,880 points
537 views
0 votes
1 answer

How do I escape a single quote in SQL Server?

Hello @kartik, Single quotes are escaped by doubling ...READ MORE

Jul 21, 2020 in PHP by Niroj
• 82,880 points
5,902 views
0 votes
1 answer

How can I do an UPDATE statement with JOIN in SQL Server?

Hello @kartik, This should work in SQL Server: update ...READ MORE

Jul 21, 2020 in PHP by Niroj
• 82,880 points
656 views
0 votes
1 answer

How to Insert multiple rows in a single SQL query?

Hello @kartik, In SQL Server you can insert ...READ MORE

Jul 21, 2020 in PHP by Niroj
• 82,880 points
4,195 views
0 votes
1 answer

How to concatenate text from multiple rows into a single text string in SQL server?

Hello @kartik, Use COALESCE: DECLARE @Names VARCHAR(8000) SELECT @Names = ...READ MORE

Jul 21, 2020 in PHP by Niroj
• 82,880 points
2,816 views
0 votes
1 answer

How do I UPDATE from a SELECT in SQL Server?

Hello @kartik, In SQL Server, use MERGE MERGE INTO YourTable ...READ MORE

Jul 21, 2020 in PHP by Niroj
• 82,880 points
715 views
0 votes
1 answer

Error:Jquery .ajax method=“post” but $_POST empty

Hello @kartik, Instead of method: "post" you need to use type: ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
3,347 views
0 votes
1 answer

How to call a php function from ajax?

Hello @kartik, You can't call a PHP function ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
12,327 views
0 votes
1 answer

How to post the parameter in ajax call of jquery datatable?

Hello @kartik, Just pass it like a normal ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
17,447 views
0 votes
1 answer

Error:Sending Form file with form using AJAX

Hello @kartik, Don't pass the files into the ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
3,467 views
0 votes
1 answer

Error:uncaught exception: out of memory in Ajax Process

Hello @kartik, From your description of being redirected ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
1,497 views
0 votes
1 answer

Error: Failed to load resource: net::ERR_CACHE_MISS

Hello @kartik, It is actually a permission issue. ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
1,651 views
0 votes
1 answer

Error:Jquery - Uncaught TypeError: Cannot use 'in' operator to search for '324' in

Hello @kartik, You have a JSON string, not ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
6,467 views
+1 vote
1 answer

Error:Ajax LARAVEL 419 POST error

Hello @kartik, Laravel 419 post error is usually ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
3,461 views
0 votes
1 answer

How to Execute PHP function with onclick?

Hello @kartik, In javascript, make an ajax function, function ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
21,842 views
0 votes
1 answer

How do I get a YouTube video thumbnail from the YouTube API?

Hello @kartik, Each YouTube video has four generated ...READ MORE

Jun 16, 2020 in PHP by Niroj
• 82,880 points
5,044 views
0 votes
1 answer

How to cache fetched data in react without redux?

Hello @kartik, The best way to save data ...READ MORE

Jun 1, 2020 in PHP by Niroj
• 82,880 points
985 views
0 votes
1 answer

How to get Redux Form data in another Component?

Hello @kartik, What you need to do is ...READ MORE

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

MySQL - UPDATE multiple rows with different values in one query

Hello @kartik You can use a CASE statement to handle ...READ MORE

Jun 1, 2020 in PHP by Niroj
• 82,880 points
33,144 views
0 votes
1 answer

How to put an 'if clause' in an SQL string?

Hello @kartik, For your specific query, you can ...READ MORE

Jun 1, 2020 in PHP by Niroj
• 82,880 points
777 views
0 votes
1 answer

How can I create XAMPP/Apache serve file outside of htdocs?

Hello @kartik, You can relocate it by editing ...READ MORE

May 19, 2020 in PHP by Niroj
• 82,880 points
2,482 views
0 votes
1 answer

How can I connect to a Tor hidden service using CURL in PHP?

Hello @kartik, I use Privoxy and cURL to scrape Tor ...READ MORE

May 19, 2020 in PHP by Niroj
• 82,880 points
4,954 views