Posts

PHP-Variables and Data Types | How to Use Variables in PHP | PHP Data Types

Variables and Data Types in PHP: - To Store Different Data in a Variable. PHP supports the Following Data Types. String (String is a sequence of Characters) String can be any text inside the code exp : $name="Visually Teach"; Integer none decimal Numbers Integer formats are :  Decimals Hexadecimals octal Exp: $my_Age=30; Float (Floating point number - also called double) Floating is number with decimal points / Double Numbers. exp: - $my_GPA=9.7; Boolean A Boolean represents two things : TRUE or FALSE. Booleans used in conditional testing. Exp:   $x = true; $y = false; Array: - To stores multiple values in one single variable Exp: $courses=array("Graphic Application","Web Application","Digital Marketing"); When you Print: - echo $courses[0] . ", " . $courses[1] . " and " . $courses[2] . "." Array Types : - There are three types of arrays: I...

PHP-ECHO

How to Print value in PHP By using Echo and Print command: - echo Method: - <?php echo "Welcome to PHP Program"."<br>"; echo "<br>"; echo "am from echo method"; ?> Output: - Welcome to PHP Program am from echo method Print Method: - <?php print "Hello am from print method"; ?> Output: - Hello am from print method

JQUERY-BANNER-FADEIN AND FADEOUT

<!doctype html> <html> <head> <meta charset="utf-8"> <title>Creating a Banner by using jquery </title> <style> *{ border:0px; padding:0px; margin:0px; } div#dynamic_banner figure img { width:100%; height:600px; position:absolute; } div#dynamic_banner .buttons { position:absolute; z-index:1000; top:550px; left:0px; width:100%; } div#dynamic_banner .buttons input[type=button]{ width:24%; height:50px; line-height:50px; text-align:center; background:rgba(255,255,255,0.5); font-size:18px; } </style> <script src="jquery.js"></script> </head> <body>     <div id="dynamic_banner">         <figure>     <img src="images/1.jpg" id="img_gp">     <img src="images/2.jpg" id="img_wp">     <img src="images/3.jpg" id="img_dm">     <img src="images/4.jpg" i...

JAVASCRIPT-CHANGE BGCOLOR BY USING TIME

<html> <head> <title>bgcolor change by time </title> <style type="text/css"> p{ line-height:40px; color:#000000; background-color:#00ff00; } </style> <script language="JavaScript"> colors=new Array("red","orange","green","silver") colorIndex=0 function changeColor() { document.bgColor=colors[colorIndex] colorIndex=(colorIndex+1) % colors.length } function startColorChange() { setInterval("changeColor()",3000) } window.onload=startColorChange </script> </head> <body bgcolor=white> <p>the change the Bgcolor every 3 sec.</p> </body> </html>

PHP-Post Data

<?php if(isset($_POST['submit'])) { $name = $_POST['name']; $email=$_POST['email']; $phone=$_POST['phone']; $comment=$_POST['comment']; mysql_connect("localhost","root",""); mysql_select_db("register_form"); $data=mysql_query("insert into quick_contact values('','$name','$email','$phone','$comment')"); if($data) {  echo "<script>alert('Your post jobs has been submitted successfully')</script>";  /*   echo "<script>location='files/post_jobs.php'</script>";   */  }  else { echo"<script>alert('your post not submited')</script>"; echo mysql_error(); } } ?> <!DOCTYPE html> <html> <head> <title> Working with web forms </title> <style type="text/css"> table { font-family:verdana; } td...

JavaScript-Popup

<!doctype html> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> <script src="js/script.js"></script> <style> #overlay {             display: none;             position: absolute;             top: 0;             bottom: 0;             background: #999;             width: 100%;             height: 100%;             opacity: 0.8;             z-index: 100;         }         .popupcontent {             padding: 10px;         } #get_popup {             display: none;           ...

Form Validation with HTML5 AND CSS3

<!doctype html> <html> <head> <meta charset="utf-8"> <title>welcome to form validation</title> <link href="form validation.css" rel="stylesheet"> </head> <body> <form name="loginform"> <fieldset> <ul>     <li>User Name</li>     <li>     <div class="symbol">n</div>     <input type="text" placeholder="User Name" required pattern="[a-z]{4,10}">     <span valid="W" invalid="X"></span>     </li>     <li>Password</li>     <li>     <div class="symbol">I</div><input type="password" placeholder="Password" required pattern="[a-z]{4,10}[@#$]{1}">     <span valid="W" invalid="X"></span>     </li>         <li><input type=...