Posts

Recent Post

Insert Records to the database Using PHP and MySQL

  To add records to the MySQL table the INSERT statement is used  To add any new records to the table we use INSERT query, which is very simple to understand and work with. Syntax: INSERT INTO Table_name (Column1, Column2, Column3, Column4... Column N) VALUES (Value1, Value2, Value3, Value4... Value N) Example: INSERT INTO mydata_tbl (Name, Gender, Age, Education) VALUES ('ABCD', 'F', 25, 'MSc') Here, in the example mydata_tbl is the name of the given table. Name, Age, Gender,  and Education are the Columns and their values are ABCD, F,25, and MSc respectively.                                                                               Other Essential MySQL Commands SELECT - To choose specific data ( record ) from  your Database   UPDATE - To update data in your Database DELETE - To Delete data from your Database CREATE DATABASE - To generate a new Database ALTER DATABASE - To modify an existing Database                                                       

Update and Delete Record Using PHP and MySQL

Update and Delete Record Using PHP and MySQL UPDATE  Query :  To Update data in your Database Syntax: UPDATE Table_name SET column=value WHERE other_column = other_value DELETE Query To delete the record from your Database To delete the data frothe m database you should use the DELETE query, the syntax is given below: DELETE  FROM Table_name WHERE column = value                                                                                                                                                      HAPPY CODING😍

PHP Login Page With Database Connection

Image
  In order to create a login page using php and html, several steps must be taken. Step 1: First we need to create database_connection.php page database_connection.php <?php     $Server_name="localhost";     $Username="root";      $Password="";     $ Database="details_db";      $link=mysqli_connect($Server_name,$Username,$Password,$Database); ?> Step 2: Make a table called details_db,and create a tale called admin_tbl. The table has four columns:admin_id,username,password,and created_date(its an optional). Step 3: Login_page.html <html>     <head>          <title>PHP LOGIN PAGE WITH DATABASE CONNECTION<title>      </head>      <body>          <center>ADMIN LOGIN <br><br>          <form action="Login_process.php" method="POST">               Enter Username <input type="text" name="username" ><br><br>               Enter Passw

Computer Fundamentals Question and Answers

 Computer Fundamentals Question and Answers Part 2 1.What is the output displayed on the screen called? Ans: Soft Copy 2.What do programs stored in the ROM of a computer are called? Ans: Firmware 3.A display device's smallest addressable element is called as___________ Ans: Pixel

Computer Fundamentals Quiz Questions with Answers

1. A source program is the program written in which language? Ans: High-level language 2. Which memory that is Non-volatile and and can only be written once ? Ans : PROM ( Programmable read-only memory) 3. What is the common boundary between two systems? Ans : Interface 4. In Octal system,  how many digits can we use ? Ans : 7

Working with CSV file Using Python

Image
About CSV Comma-separated values are known as CSV. It is the simplest form of storing data in tabular form as plain text. Data Scientists need to know how to work with CSV data because most of their activities involve CSV data.In CSV files, the first line contains the field/feature names. The following lines of the file are observations/records. The values of a record are separated by “comma.” Here we have a file named “annual-energy-survey-demo-csv.csv” using this CSV file, we will try to learn how to  read and write the CSV files. In this article, I'll explain in detail how you can read and write CSV files in Python.   # Import the csv library import csv # Open the CSV file file = open ( '/content/drive/MyDrive/annual-enpr-survey-demo-csv.csv' ) type ( file ) output: io.TextIOWrapper # Use the csv.reader object to read the CSV file  csvreader = csv.reader( file ) # Extract the fields names csv_header = [] csv_header = next (csvreader) print(header)   Output: ['Year&

Validation Code For Phone Number Using preg_match() in Php

Image
Phone Number Validation Using preg_match() Below code shows validation of Phone Number 1)Checking whether user input (Phone Number) contains an alphabet in Phone Number          <?php         $mobile_no="123fdgdg890";        if(preg_match("/[a-z][A-Z]/i", $mobile_no))        {   echo "Invalid Phone Number!";        }else{                echo "Valid Phone Number!";        }      ?> Output :Invalid Phone Number! Syntax preg_match("/[a-z][A-Z]/i", $mobile_no) The above syntax will verify whether given phone number is well-formed or not.if it is not, it will show an error message. The    preg_match()  function helps to find whether a given variable is valid or not. 2 )Checking whether user input (Phone Number) contains 10 digits in Phone Number      <?php       $mobile_no="1234567890";      if(preg_match('/^[0-9]{10}$/', $mobile_no))           {                   // valid                echo "Valid Phone Num