How To Insert Records Using Stored Procedure in MySql with PHP ?

MySQL stored procedure insert PHP image

If you want to insert large records in a table so it is great to do that by using of Stored Procedure. There are number of benefits to insert record with the use of Stored Procedure Stored procedure cached on server so the speed is more fast.  A Stored Procedures will be in one place so that there’s no confusion of having business rules spread over potentially disparate code files in the project. More secure because there is no direct access with tables in database. I am describing the process…

How to Get Title, Description, and Keywords of a Website in PHP ?

PHP website metadata extraction image

I found most of the people asking for a way to get meta data of a website, so I thought to share the logic with a very easy PHP script that will retrieve a website page title, keywords and description. You can also get the sitemap of a website url. Here I am describing it with proper UI and with output. So follow these steps. Step #1 : First design a page where you can input website URL. Copy index.php Code :- <form action=”show.php” method=”POST”>     <table cellspacing=”0″ height=”38%”…

How to Answer for the Tell Me About Yourself Interview Question ?

Interview tell about yourself answer image

Commonly interviewer start an interview with some simple question like “Tell me about yourself” . The purpose of asking this question in the first is to make you feel more comfortable during the interview process. It is also a way for the interviewer to judge your personality to help determine if you are best fit for the job. This question is seems like so simple that is why most of the people neglect to prepare for it, but it’s crucial. so to prepare the answer for this question you should…

Most important 35 PHP interview questions and answers for freshers

PHP interview questions for freshers image

 I am an experienced PHP developer so here I am sharing my own personal interview experience. I had given around 40 interview’s that time and I got selected in my last 5 interviews. So in this article I am sharing 35 basic PHP programming interview questions with answers that will surely helpful for freshers to get a job. All questions are related to php, mysql, javascript, html, css and jquery. Question #1 – What is PHP? PHP is an open source server side scripting language mostly used for web applications.…

How to Create a Simple Stored Procedure in mysql?

MySQL stored procedure tutorial image

What is a Stored Procedure? A stored procedure is a set of SQL statements that form a logical unit to perform a specific task. It encapsulates a group of operations or queries executed on a database server. Why Use Stored Procedures? Stored procedures isolate the client from implementation details and the underlying schema. They also reduce network traffic by executing SQL statements in batches, minimizing multiple client requests. Syntax: DELIMITER $$ CREATE PROCEDURE `simpleprocedure`(IN name varchar(50), IN user_name varchar(50), IN branch varchar(50)) BEGIN INSERT INTO student (name, user_name, branch) VALUES…

7 Best Free & Open source Video CMS For Sharing Videos

Free video CMS platforms image

0pen s0urce vide0 cms built 0n 0pen s0urce c0de is a platf0rm that pr0vides a c0ntent management system just like p0pular W0rdPres but f0r Vide0s. Y0uTube and Vime0 are the best examples 0f Vid0e CMS. But if y0u want t0 run y0ur 0wn vide0 bl0g t0 share the vide0 y0u can g0 f0r self-h0sted vide0 CMS. The best vide0 CMS sh0uld have     Inbuilt security     SE0 0ptimati0n     Light and speedy     Tracking system     Updates There are s0me best 0pen s0urce vide0 CMS that helps y0u built y0ur…

How to redirect HTTP to HTTPS automatically?

HTTP to HTTPS redirect tutorial image

image source : wikipedia.org If you have a secure certificate (SSL) on your website, you can automatically redirect visit0rs to the secured (HTTPS) version of your website to make sure their information is pr0tected. How you redirect traffic depends on the type of h0sting you have. Linux & cPanel Linux-based acc0unts use .htaccess files to handle redirecti0n. If you need to create a .htaccess file, you can use your control panel’s file manager (Web & Classic / cPanel). Using the following code in your .htaccess file automatically redirects visit0rs to…

how to search a specific word in a string in php?

PHP string manipulation tutorial image

You can use the strpos function which is used to find the occurrence of one string inside other strpos() : strpos() function — Find the position of the first occurrence of a substring in a different string It’s support (PHP 4, PHP 5, PHP 7).     Syntax : mixed strpos ( string $haystack , mixed $needle [, int $offset = 0 ] ) Find the numeric position of the first occurrence of needle in the haystack string. Parameters : haystack    The string to search in.   needle    If needle is not a string, it is converted to an integer and applied as the ordinal value of a character.  …

How to count the number of substring occurrences in a string ?

PHP string manipulation tutorial image

Common PHP issue that mostly developer face. below is the solution for such type of issue.. substr_count substr_count — Count the number of substring occurrences int substr_count ( string $haystack , string $needle [, int $offset = 0 [, int $length ]] ) substr_count() returns the number of times the needle substring occurs in the haystack string. Please note that needle is case sensitive. Note: This function doesn’t count overlapped substrings. See the example below! Parameters ¶ haystack The string to search in needle The substring to search for offset The offset where to start counting. If the offset is negative, counting starts from the end of the string. length The maximum length after the…