Posts

Add backend validation in wordpress using php

Validations  :-                     validation checks given input is valid or not. There are two types of validation.                     1) Frontend Validation i.e.  client side Validation.                     2) Backend Validation i.e. Server side validation.  (if you want to check frontend validation code go to this url:  https://programmingtechnologys.blogspot.com/2020/08/realtime-front-end-validations.html )             Code :- <?php include_once '../wp-load.php'; global $wpdb;    class userInformation{ $firstName = $_POST['first_name']; $lastName = $_POST['last_name']; $mobileNum = $_POST['mobile_num']; $emailId = $_POST['email']; $password = $_POST['password']; $cPassword = $_POST['cpassword']; public function __construct(){ } /** * User registration fu...

Generate tambola (housie) game ticket using php

Image
Tambola game logic :- Tambola ticket consists 3 rows and 9 columns which makes 27 spaces.   Each row has a total 5 numbers printed and total 4 spaces are empty. And column can have 1,2 or 3 numbers printed on it. Number should not be repeat in each spaces. Code :- <?php $numberOfRows = 3;          //decides number of rows $totalNumber = 100;           //decides total number $numberOfColoumn = 9;   // decides number of coloums $emptySpace = 4;              // decides empty spaces  $number = array_chunk(range(1,$totalNumber), 10); $col1 = []; $array1 = $number[0]; $randIndex1 = array_rand($array1,$numberOfRows); for ($i=0; $i < $numberOfRows; $i++) {  $col1[$i] =  $array1[$randIndex1[$i]]; } $col2 = []; $array1 = $number[1]; $randIndex1 = array_rand($array1,$numberOfRows); for ($i=0; $i < $numberOfRows; $i++) {  $col2[$i] =  $array1[$randIndex1[...

C Programming language

Basic structure of a program - structure of c program is defined by set of rules called protocol. All C programs are having sections/parts which are mentioned below. Documentation section - comment etc. Link section - header file. Defined section - declaration. Global declaration section - define in section. Function prototype declaration section. Main function - void main(). User defined function definition section - perform particular task. C programming is a case sensitive programming language. C language is procedural oriented programming (POP) language It uses C compilers for program compilation. It is high level as well as user friendly programming language. C is invented to write an operating system called UNIX. C is successor of B language which was introduced around 1970.

How to create website using HTML, JS, PHP and CSS

There are two ways to create a website.  Online website builder (you don't need technical knowledge, there are various templates available). Using code (you need to study programming languages which is used for building website example :- HTML, CSS, JS, PHP). How to create website using code. Technology  Front-end   :-  HTML (Hyper Text Markup Language) and JS (JavaScript). Design       :-  CSS (Cascading Style Sheets). Back-end   :-  PHP ( Personal Home Page ). Database    :- MySQL , Firebase. Why use this technology ?  HTML     = HTML is used for create a user interface (UI). JS            = JS is used for building front-end logic and front-end validations. CSS         = CSS is used for design UI. PHP         = PHP is used for connect database and perform database queries. Datab...