Friday, 10 June 2022

PHP Email verification Code example

 (1)first create table user:


create table user
(id int primary key auto_increment,

name varchar(200),
email varchar(200),
phone varchar(200),
password varchar(200),
com_code varchar(200));


(2)write code for connect.php file:

<?php

$con=mysqli_connect("localhost","root","","database");


?>

(3)write code for registerform.php file:
<?php


echo '<form action="insert1.php"   method="post">
      Name<input type=text name="name">
  Email<input type=email name="email">
  phone  <input type=text    name="phone">
  password<input type=password name="password">
  <input  type=submit  name=submit value=submit>';
 
  
?>

(4)write code for insert1.php file:



<?php
$name=$_POST['name'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$password=$_POST['password'];
$com_code=md5(uniqid(rand()));
include_once("connect.php");

$sql="insert into user(name,email,phone,password,com_code)values('$name','$email','$phone','$password','$com_code')";

$result=mysqli_query($con,$sql) ;

if($result)
  {
   $to = $email;
   $subject = "Confirmation from Musaib to $username";
   $header = "Musaibwebsite: Confirmation LInk";
  
   $message .= "http://musaib.com/confirm.php?passkey=$com_code";

   $sentmail = mail($to,$subject,$message,$header);

   if($sentmail)
            {
   echo "Your Confirmation link Has Been Sent To Your Email Address.";
   }
   else
         {
    echo "Cannot send Confirmation link to your e-mail address";
   }

}

?>

(5)write code for confirm.php file:

<?php

include_once("connect.php");

$passkey = $_GET['passkey'];

 $sql="update user set com_code='1'  where com_code='$passkey'";

$result=mysqli_query($con,$sql) ;

if($result)

{


echo "your account is active ";




}



?>

Blockchain Development Training in Free with Certification

 Are you  want to start career in most globally demanded course Blockchain Development Training in Free with Certification  click here for free sign up



tinyurl.com/freeblockchaincourse

Thursday, 9 June 2022

Python Basic Syllabus

  •  Python Introduction
  • Python Syntax
  • Python Comments
  • Python Variables
  • Python Data Types
  • Python Numbers
  • Python Casting
  • Python Strings
  • Python Booleans
  • Python Operators
  • Python Lists
  • Python Tuples
  • Python Sets
  • Python Dictionaries
  • Python If...Else
  • Python While Loops
  • Python For Loops
  • Python Functions
  • Python Lambda
  • Python Arrays


Software Programming Certification:-

We Provide professional certificate courses designed to acquire expertise in programming languages   :- C, C++, JAVA, Python, Html,Css,Javascrip,Jquery , PHP & mysql

Software Programmer are in high demand due to the rapid growth of the Information & Technology sector in India. These courses focus on the Programming Languages and Design and Development of multiple  software.

 

What does a Software Programmer Do ?

The Prime responsibilities of   Software Developer is as follows:

  • Designing and Creating Software: The main responsibility in a software development job is to develop functional software after performing extensive research on the specific requirements of the user.
  • Evaluating Both New and Existing Software: Software developers run tests on the softwares to ensure it is completely functional and free from bugs after coding and encrypting. They have to perform quality assurance (QA) tests and diagnostic programs on newly designed software prior to their launch as well as the existing projects so as to test their efficacy and reliability quotient.
  • Enhancing Existing Software Systems: Software developer’s job is to monitor user feedback and suggestions and incorporate those suggestions into the existing software infrastructure to continually improve it. Software developers must be able to identify the core functionality of software programs and enhance its performance and security level.  
  • Maintenance Of Existing Systems: Software developers have to continually monitor and maintain the efficacy of both the new and existing software systems by running QA tests from time to time. Software developers have to find solutions to the problems arising and eliminate them in due time.
  • Collaborating With Other Teams: Software developer’s have to collaborate with other developers in his/her team like project managers, computer programmers, graphic designers, and database administrators. They have to regularly consult with clients and project managers to learn about the progress of their software projects.

 

Wednesday, 11 May 2022

Object Oriented Principles of Java(OOPs) in Hindi

 

Object Oriented Principles of Java(OOPs)

java के बारे में आप पहले बताया जा चूका है की java एक object oriented programming language होता है java भी सभी object oriented programming language की तरह object oriented principles को follow करती है

इन principles के बारे में निचे दिया जा रहा है

Encapsulation

encapsulation को डाटा hiding भी कहते है encapsulation में आप प्राइवेट variable declare करते है और आओ उन्हें पब्लिक methods के द्वारा (through) एक्सेस करते है आपके variable को आपकी ही क्लास के methods access कर सकते है

जिससे दूसरी कोई भी class आपके variable को access नही कर सकती है इस प्रकार आप डाटा को hide भी किया जा सकता है और प्रयोग भी किया जा सकता है

java में 3 level(लेवल) की डाटा hiding को provide करती है

  • Public-इस level की सहायता से आप पब्लिक(public) class members को दूसरी कोई भी classes access कर सकती है
  • Private-यह दूसरा level है जिसकी सहायता से आप प्राइवेट(private) class members को दूसरी कोई भी class access नही कर सकती है
  • Protected-यह java का तीसरा level है जिसकी सहायता से आप केवल आपकी class को inherit करने वाली class ही आपके class members को access कर सकता है

Inheritance

inheritance की सहायता से आप एक class के variable को आप दूसरी class के variable को access कर सकते है ऐसा करने से आपको एक जैसा method(code) को बार बार लिखने की आवश्यकता नही होती है जिससे कंप्यूटर की मेमोरी और समय दोनों बचता है

java में multiple inheritance allow नहीं होता है क्योकि इसमे एक class सिर्फ एक ही class को inherit कर सकता है

इसलिए inheritance की “multiple inheritance allow नहीं” की कमी को java interfaces के through पूरा करता है

Polymorphism

polymorphism का मतलब है  एक name  और कई काम polymorphism के through आप एक interface से situation के according अलग अलग action ले सकते है

जैसे की आप इसे method ओवरलोडिंग(overloading) में किया जाता है

Abstraction

abstraction java का एक बहुत ही महत्वपूर्ण कांसेप्ट(important concept) होता है जैसे की जब आप bike को चलाते है पर आपको यह मालूम नही होता है की bike कैसे काम करती है केवल आप उसे बस चलाते है उसी internal working के बारे में आपको पता नही होता है  उसी प्रकार abstraction का भी same concept है आप अपने सॉफ्टवेर की internal working user को शो (show) नहीं करते है बस user को वो interface provide करते है जिससे की वो interact करेगा



java data types in Hindi-जावा डाटा टाइप क्या है?

सामान्यत: data आपके पास कई प्रकार से available हो सकता है जैसे की किसी व्यक्ति का नाम उसका उम्र आदि

data अलग अलग तरह के होते है कभी data को संख्या में होता है तो शब्दों को होता है इसीलिए java में data को अलग अलग category में रखा गया है कोई भी वेरिएबल(variable) create करने से पहले आप उसमे किस तरह का data को स्टोर करना चाहिए define करना पड़ता है इसे ही data टाइप(Data type in java in Hindi) कहते है

java में data types(Data type in java in Hindi) को दो प्रकार से  किया गया है

1.Primitive Data Type

2.Non-primitive Data Type

Primitive Data Type

Integers

integers complete नंबर होता है जो numbers में fractional पार्ट (दशमलव और उसके बाद की संख्या ) include नहीं किया जाता है java में integer data types को उसकी साइज़ के according 4 categories में define किया जाता है

Type                                                 Explanation                                                                                         Example

ByteByte की साइज़ 8 बिट की होती है -127 से लेकर 128 तक की कोई भी वैल्यू(value) आप byte में स्टोर कर सकते है byte age=40;
Shortshort की साइज़ 16 बिट होती है short में -32768 से लेकर 68 से लेकर 32767 तक का कोई भी value स्टोर की जा सकती हैshort salary=25000;
Intint की साइज़ 32 बिट की होती है int में -214748364 B से लेकर 2147483747 तक की कोई भी value स्टोर की जा सकती हैint population =2,00,000
longlong की साइज़ 64 बिट की होती है इसकी वैल्यू 9223372036854775808(-263) से 9223372036854775807 (263-1) तक होता है इसमे आप बड़ी से बड़ी value को स्टोर कर सकते है तथा इसमे ध्यान देना चाहिए की इसकी वैल्यू को L से end करना होता हैlong my number=80000000L

Floating point numbers

floating point numbers वो numbers होते है जिनमे fractional part (दशमलव और उसके बाद सख्या) को represent किया जाता है

जैसे जब आप कोई important mathematical कैलकुलेशन कर रहे हो तो  इन numbers का बहुत महत्त्व रहता है java में floating point data types को 2 categories में define किया गया है

TypeExplanationExample
Floatfloat single precision value को represent करता है float की साइज़ 32 बिट होती है

float में 1.4e-045  से लेकर 3.4e+038 तक की value स्टोर की जा सकती है float में दशमलव के बाद केवल एक value represent की जाती है

float temp=34.4;
Doubledouble double precision value को represent करता है double की साइज़ 64 बिट होती है

double में 4.9e – 324 से लेकर 1.8e +308 तक की value स्टोर की जा सकती है double में दशमलव के बाद 7 value तक स्टोर की जा सकती है

 double pi=3.1416

Character

किसी एक अक्षर को स्टोर करने के लिए आप character का प्रयोग करते है java में character data type की साइज़ 16 बिट की होती है character को char keyword से represent किया जाता है

char furlong =”c”

Boolean

java में boolean data type को logical decision स्टोर करने के लिए प्रयोग किया जाता है boolean variable की वैल्यू 2 तरह की होती है

true या false

boolean is five more than one =”true”

Non-primitive Data Type

जावा में  non- primitive डाटा टाइप ऑब्जेक्ट(object) को refer करते है ये निम्नलिखित प्रकार के होते है –

Interface-class की तरह ही interface में भी मेथोड्स और वेरिएबल होते है जिसमे इसके declare की गयी मेथड abstract होते है

class-class किसी यूजर के द्वारा डिफाइन किया गया photo type होता है जिससे objects बनाये जाते है तथा इसमे मेथोड्स और वेरिएबल होते है

स्ट्रिंग(string)-string का प्रयोग characters के एक क्रम(sequence) को store करने के लिए किया जाता है तथा इसकी वैल्यू के डबल(double) quote के अन्दर लिखा जाता है

for example:- string myname=”school”

array-array एक समान डाटा टाइप एक कलेक्शन(collection) होता है

 

Introduction to java operators

जैसा की आप सब जानते है operators का उपयोग आप variables पर operations perform करने के लिए करते है। हर data type पर अलग अलग operations perform किये जाते है। इसलिए operators भी अलग अलग यूज़ होते है।

Operators unary और binary 2 प्रकार के होते है। Operators के साथ यूज़ होने वाले variables को operand कहते है। Unary operators एक operand के साथ apply होते है और binary operators 2 operands पर apply होते है।

Java में मुख्यतः 6 type के operators होते है।

  1. Arithmetic operators
  2. Logical operators
  3. Bit wise operators
  4. Relational operators
  5. Assignment operators
  6. Conditional operators

इन सभी operators आपको  निचे दिया जा रहा है।

Arithmetic operators

Arithmetic operators mathematical computation perform करने के लिए यूज़ किये जाते है। Arithmetic operators 5 type के होते है। इनके बारे में निचे दिया जा रहा है।

Addition  (+)Addition operator 2 values को add करने के लिए यूज़ किया जाता है। a+b
Subtraction (-)Subtraction operator एक value में से दूसरी value को subtract
 करने के लिए यूज़ किया जाता है।
 a-c
Multiplication(*)Multiplication operators 2 variables की values
 को multiply करने के लिए यूज़ किया जाता है।
 a*b
Division(/)किसी एक variable की संख्या का भाग दूसरे
variable की संख्या में देने के लिए division operator यूज़ किया जाता है।
 a/b
Modulus(%)भाग देने के बाद यदि आप शेष बची हुई संख्या प्राप्त करना चाहते है
तो modulus operator यूज़ करते है।
 a%b

Logical operators

Logical operators boolean values पर operations perform करने के लिए यूज़ किये जाते है। ये operators 3 तरह के होते है। इस तरह के operations में दोनों variables की value true या false हो सकती है। Logical operators के बारे में निचे दिया जा रहा है।

Operator

Explanation

Example

Logical AND (&&)इस तरह के operators के  साथ  जब दोनों variables की
value true होती है तो ही  result true होता है नहीं तो यह false
हो जाता है
a&&b
Logical OR (||)इस तरह के operator के साथ यदि दोनों variables में से
किसी एक भी value true होगी तो result true ही होगा।
a||b
Logical NOT (!)ये एक unary operator है। जिस भी variable के साथ ये
यूज़ किया जाता है उस variable की value को उल्टा कर देता है।
 !a

Bit-wise operators

Bit-wise operators bit by bit operations perform करने के लिए यूज़ किये जाते है। ये operators variables की values को bits में convert करके उन पर operations perform करते है।Bit wise operators 4 तरह के होते है । जिनके  बारे में आपको निचे दिया जा रहा है।

Operator

Explanation

Example

Bit wise AND (&)इस operator को जिन 2 variables के साथ यूज़ किया जाता है
 ये उनकी common bits को result variable में copy कर देता है।
a&b
Bit wise OR (|)इस operator को जिन 2 variables के साथ यूज़ किया जाता है
 ये उनकी uncommon bits को result variable में copy कर देता है।
a|b
Left shift (<<)इस operator के द्वारा आप किसी variable की value को bits
में convert करने के बाद उसकी bits को left में shift करते है। कितनी bits को शिफ्ट करना है ये वो variable बताता है जो इसके right में होता है।
a<<b
Right shift (>>)इस variable के द्वारा आप किसी variable की value को
bits में convert करने के बाद उसकी values को right में
shift करते है। कितनी bits को shift करना है ये वो variable बताता है जो इसके right में होता है।
a>>b

     Relational operators

Relational operators 2 variables के बीच में relation को पता लगाने के लिए यूज़ किये जाते है। इनका प्रयोग ज्यादातर if statement में किया जाता है। इन operators से आपको 2 variables के बीच में relation का पता लगता है  जैसे की क्या दोनों variables बराबर है या एक छोटा और एक बड़ा है।

Operator

Explanation

Example

Equal to (==)यदि दोनों variables equal होते है तो result true होता है।a==b
Not equal to(!=)यदि दोनों variables एक दूसरे के equal नहीं होता है  तो result
true return होता है।
a!=b
Greater than(>)यदि left side का variable right side के variable से बड़ा है
तो result true होता है।
a>b
Less than(<)यदि left side का variable right side के variable से छोटा है
तो result true होता है।
a<b
Greater than equal to (>=)यदि left side का variable right side के variable से बड़ा है
या उसके बराबर है तो result true होगा।
a>=b
Less than equal to (<=)यदि left side का variable right side के variable से छोटा है
या उसके बराबर है तो result true होता है
a<=b

  Assignment operators

Assignment process को simple और fast बनाने के लिए java कुछ assignment operators provide करती है। इनके बारे में निचे दिया जा रहा है।

Operator

Explanation

Example

Simple assignment (=)ये operator right value की value left variable को assign करता है।a=b;
Plus assignment (+=)ये operator left और right variables की value को
add करके left variable में store करता है।
a+=b;
Minus assignment(-=)ये operator left side के variable की value में से right
side के variable की value घटाकर result left side के
 variable में store करता है।
a-=b
Multiply assignment(*=)ये operator left और right side के variables की
 values को multiply करके result left side के
variable में store करता है।
a*=b
Divide assignment(/=)ये operator left side के variable की value को
 right side के variable से divide करके
result left side के variable में store करता है।
a/=b

 

Conditional operator (?:)

Conditional operator java का special operator होता है जो if statement की तरह काम करता है। इसे ternary operator भी कहते है। ये variables में conditions के according values store करने के लिए यूज़ किया जाता है। इस operator में ? से पहले एक condition दी जाती है , यदि वो condition true है तो colon से पहले वाली value नहीं तो colon के बाद वाली value variable में store होती है।

Example

a=5, b=3;

c= a>b?a:b; // c में a की value store की जाएगी।

 a%b



















Thursday, 5 May 2022

Performing GET Request with AJAX using jQuery

 Step 1:- write code fro ajaxform.php  file :-


<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<title>Example of Sending Data with Ajax GET Request in jQuery</title>

<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>

<script>

$(document).ready(function(){

    $("button").click(function(){

        // Get value from input element on the page

        var numValue = $("#num").val();

        

        // Send the input data to the server using get

        $.get("submission.php", {number: numValue} , function(data){

            // Display the returned data in browser

            $("#result").html(data);

        });

    });

});

</script>

</head>

<body>

    <label>Enter a Number: <input type="text" id="num"></label>

    <button type="button">Show Multiplication Table</button>

    <div id="result"></div>

</body>

</html>


Step 2:- write submission.php file


<?php

$number = $_GET["number"];

if(is_numeric($number) && $number > 0){

    echo "<table>";

    for($i=0; $i<11; $i++){

        echo "<tr>";

            echo "<td>$number x $i</td>";

            echo "<td>=</td>";

            echo "<td>" . $number * $i . "</td>";

        echo "</tr>";

    }

    echo "</table>";

}

?>

Steps to make Ajax POST request with JQuery and PHP

 step 1:- ajaxfrom.php file code :-



<!DOCTYPE html>

<html>

<head>

<title>Ajax POST request with JQuery and PHP</title>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

<style type="text/css">

body {

font-family: calibri;

}

.box {

margin-bottom: 10px;

}

.box label {

display: inline-block;

width: 80px;

text-align: right;

margin-right: 10px;

}

.box input, .box textarea {

border-radius: 3px;

border: 1px solid #ddd;

padding: 5px 10px;

}

.btn-submit {

margin-left: 90px;

}

</style>

</head>

<body>

<form>

<div class="box">

<label>First Name:</label><input type="text" name="firstName" id="firstName" />

</div>

<div class="box">

<label>Last Name:</label><input type="text" name="lastName" id="lastName" />

</div>

<div class="box">

<label>Email:</label><input type="email" name="email" id="email" />

</div>

<div class="box">

<label>Message:</label><textarea type="text" name="message" id="message"></textarea>

</div>

<input id="submit" type="button" class="btn-submit" value="Submit" />

</form>

<script>

$(document).ready(function() {


$("#submit").click(function() {


var firstName = $("#firstName").val();

var lastName = $("#lastName").val();

var email = $("#email").val();

var message = $("#message").val();


if(firstName==''||lastName==''||email==''||message=='') {

alert("Please fill all fields.");

return false;

}


$.ajax({

type: "POST",

url: "submission.php",

data: {

firstName: firstName,

lastName: lastName,

email: email,

message: message

},

cache: false,

success: function(data) {

$("#response").html(data);

},

error: function(xhr, status, error) {

console.error(xhr);

}

});

});


});

</script>

<div id="response"></div>

</body>

</html>


step 2:- 

submission.php file code :


<?php


/*

* Write your logic to manage the data

* like storing data in database

*/


// POST Data

$name= $_POST['firstName'] . " " . $_POST['lastName'];

$email = $_POST['email'];

$message = $_POST['message'];


echo $name;

echo $email;

echo $message;


?>


or you can use with json code ..

<?php


/*

* Write your logic to manage the data

* like storing data in database

*/


// POST Data

$data['name'] = $_POST['firstName'] . " " . $_POST['lastName'];

$data['email'] = $_POST['email'];

$data['message'] = $_POST['message'];


echo json_encode($data);

exit;


?>

Wednesday, 27 April 2022

jQuery - AJAX Introduction

 AJAX is the art of exchanging data with a server, and updating parts of a web page - without reloading the whole page.

What is AJAX?

AJAX = Asynchronous JavaScript and XML.

In short; AJAX is about loading data in the background and display it on the webpage, without reloading the whole page.

Examples of applications using AJAX: Gmail, Google Maps, Youtube, and Facebook tabs.


jQuery load() Method

The jQuery load() method is a simple, but powerful AJAX method.

The load() method loads data from a server and puts the returned data into the selected element.

<!DOCTYPE html>

<html>

<head>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>

<script>

$(document).ready(function(){

  $("button").click(function(){

    $("#div1").load("demo_test.txt");

  });

});

</script>

</head>

<body>


<div id="div1"><h2>Let jQuery AJAX Change This Text</h2></div>


<button>Get External Content</button>


</body>

</html>


The optional callback parameter specifies a callback function to run when the load() method is completed. The callback function can have different parameters:

  • responseTxt - contains the resulting content if the call succeeds
  • statusTxt - contains the status of the call
  • xhr - contains the XMLHttpRequest object

The following example displays an alert box after the load() method completes. If the load() method has succeeded, it displays "External content loaded successfully!", and if it fails it displays an error message:


Example


<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $("#div1").load("demo_test.txt", function(responseTxt, statusTxt, xhr){
      if(statusTxt == "success")
        alert("External content loaded successfully!");
      if(statusTxt == "error")
        alert("Error: " + xhr.status + ": " + xhr.statusText);
    });
  });
});
</script>
</head>
<body>

<div id="div1"><h2>Let jQuery AJAX Change This Text</h2></div>

<button>Get External Content</button>

</body>
</html>


The jQuery get() and post() methods are used to request data from the server with an HTTP GET or POST request.


HTTP Request: GET vs. POST

Two commonly used methods for a request-response between a client and server are: GET and POST.

  • GET - Requests data from a specified resource
  • POST - Submits data to be processed to a specified resource

GET is basically used for just getting (retrieving) some data from the server. Note: The GET method may return cached data.

POST can also be used to get some data from the server. However, the POST method NEVER caches data, and is often used to send data along with the request.