Monday, 18 December 2017

PHP in Research - Bioinformatics

Hi All,

PHP can be easily used for similarity checking for sequences using

i)  Jaccard
ii) Cosine
iii) Overlap and
iv) Dice

The program will be published soon

Saturday, 16 December 2017

New Advanced Computer Science Projects supported by my Research Centre- 2017-18

Hi All,
My Company has added few more project titles for 2017-18 Batch . Contact me for Project Support.

Doing an innovative project using advance technology is no big deal.
You need passion...that's the only requirement.
Anyone can be taught any technology if interested.


1. Windspeed prediction using Artificial Neural Networks (ANN)

2. Weather Reporting using R-Pi, Python and Twitter Interface

3. Student performance Prediction using Artificial Neural Networks (ANN)

4. Weather Forecasting using Artificial Neural Networks (ANN)

5. Twitter Sentiment Analysis using Python

6. Cancer prediction using Artificial Neural Networks (ANN)

7. Protein Interaction Prediction using Support Vector machine(SVM)

8. Car Number Plate detection and recognition using Matlab Image Processing Toolkit.

9. DNA cryptography for Text and Image Encryption using Matlab

Wednesday, 13 December 2017

Ajax

HI All,

Program 1 - ajaxmain.php
----------------------
<html>
<head>
<script>
function loadDoc() {
//alert('HUP');
     var

key=document.frmsearch.sname.value;
      var xhttp = new XMLHttpRequest();
      xhttp.onreadystatechange =

function() {
        if (xhttp.readyState == 4 &&

xhttp.status == 200) {
             document.getElementById

("demo").innerHTML = xhttp.responseText;
        }
  };
  xhttp.open("GET", "searchstud.php?

key="+key, true);
  xhttp.send();
}
</script>


</head>
<body >
<form name=frmsearch  method=post>
<center>Name <input type=text name=sname

onkeyup="loadDoc()"><input type=button

value='Search Student'onclick="loadDoc

()">
</center>
</form>
<div id="demo" align=center><h2>Search

Result</h2></div>
</body>
</html>


-----------------------
Program 2 - searchstud.php

<?php
$con=mysql_connect("localhost","root","");
mysql_select_db("m301db",$con);
$sname=$_GET['key'];

$sql="Select * from tbl_student where st_name like '%$sname%'";



$data=mysql_query($sql,$con);
echo "<table border=1 align=center width=50%>";
echo "<tr><th>Name</th><th>Roll No</th><th>Marks</th></tr>";
while($row=mysql_fetch_array($data))
{
$name=$row[0];
$rollno=$row[1];
$marks=$row[2];

echo "<tr><td>$name</td><td>$rollno</td><td>$marks</td></tr>";

}

mysql_close($con);

?>

Search Without Ajax

Hi All,
Find the code below.

<html>
<body>
<?php
include('connect.php');
?>
<form method=post>
<pre>

Name    <input type=text name=name>

<input type=submit value='Search' >
</form>
</pre>
<table border=1 align=center>
<tr><th>Id</th><th>Name</th><th>Marks</th><th>Rank</th></tr>"
<?php
if(isset($_POST['name']))
{

$name=$_POST['name'];
$sql="select * from tbl_student where st_name like '%$name%'";

$data=mysql_query($sql,$con) ;
while($row=mysql_fetch_row($data))
{
echo "<tr><td>$row[0]</td><td>$row[1]</td><td>$row[2]</td><td>$row[3]

</td><td><a href=delstudent.php?id=$row[0]&name=$row[1]&marks=$row[2]

>Delete<a></td></tr>";

}

}

?>
</table>   
</body>
</html>

Tuesday, 12 December 2017

Multiple Submit Buttons

Hi All,
Please see the code.

<html>
<body>
<form method=post>
Number1 <input type=text name=num1>
Number2 <input type=text name=num2>
<input type=submit value='Add' name=btnadd>
<input type=submit value='Sub' name=btnsub>
</form>
<?php
if(isset($_POST['num1']))
{
$n1=$_POST['num1'];
$n2=$_POST['num2'];
if(isset($_POST['btnadd']))
{
$sum=$n1+$n2;
echo "Sum is ".$sum;
}
else if(isset($_POST['btnsub']))
{
$diff=$n1-$n2;
echo "Difference is ".$diff;
}

}//IF ends
?>
   
</body>
</html>

Friday, 20 October 2017

Load one Combo based on another combo without Ajax

HI All,
Find this code


<!DOCTYPE html>
<!-- Website template by freewebsitetemplates.com -->
<html>
<head>
 <meta charset="UTF-8">
 <title>Services - Medical Hospital Website Template</title>
 <link rel="stylesheet" href="css/style.css" type="text/css">
 <script>
function loadDoc() {
document.frmsearch.action='#';
document.frmsearch.submit();
//alert('HUP');
/*
     var key=document.frmsearch.pps.value;
      var xhttp = new XMLHttpRequest();
      xhttp.onreadystatechange = function() {
        if (xhttp.readyState == 4 && xhttp.status == 200) {
             document.getElementById("demo").innerHTML = xhttp.responseText;
        }
  };
  xhttp.open("GET", "searchdoctor.php?key="+key, true);
  xhttp.send();
  */
}
function assign()
{
 alert('HUP');
}
</script>

</head>
<body>
 <div class="background">
  <div class="page">
   <a href="index.html" id="logo">Hospital management with patient disease prediction</a>
   <div class="sidebar">
    <ul>
     <li>
      <a href="index.php">Back</a>
     </li>
    <div class="first">

      <p>
        <br> <?php
include"patientmenu.php"
?>     <div>
                 </p>
     </div>
    </div>
    <div>

      <p>
      
      </p>
      <img src="images/doctors-and-nurse.jpg" alt="">
      <p>
             </p>
     </div>
    </div>
   </div>
   <div class="body">
    <div class="services">
     <div>
     <center> <b> PATIENT DETAILS</b></center>
<body>
<?php
 include('dbconnect.php');
$data=mysql_query("select max(id) as mid from appointment");
$row=mysql_fetch_array($data);
$did=$row['mid']+1;
?>
<?php
if(isset($_POST['pps']))
{
echo "entered";
$sname=$_POST['pps'];
$sql="Select doctorname from doctorreg where specialization like '%$sname%'";

$data=mysql_query($sql,$con);
$str= "<select name=pcd >";
while($row=mysql_fetch_array($data))
{
$name=$row['doctorname'];
$str=$str. "<option value='$name'>$name</option>";
}
$str=$str. "</select>";
mysql_close($con);
$str1="<option value='$sname'>$sname</option>";
}
else
{
 $str="";
 $str1="<option value='selected'>--Select--</option>";
}
?>
<form name=frmsearch action=appoinsert.php method=post enctype="multipart/form-data"><table align=center>
<tr>
<td width="168">   Id</td>
    <td>:</td>
    <td width="255"><?php echo $did ?>
        <input type=hidden name="pid" value="<?php echo $did ?>"></td>
  <tr><td>Specialization:</td><td><select name=pps onChange="loadDoc()"><?php echo $str1; ?><option value='cardiology'>Cardiology</option><option value='ENT'>ENT</option> </select></td></tr>
<tr><td>Consulting Doctor name:</td><td><?php echo $str; ?></td></tr>
<tr><td>Patient Name:</td><td><input type="text"name="pname""required="required"></td></tr>
<tr><td>Address :</td><td><input type="text"name="pad" pattern"[a-z,A-Z]{1,10} required="required"></td></tr>
<tr><td>ContactNo:</td><td><input type="text"name="pdd" required="required"></td></tr>
<tr><td>Date:</td><td><input type="date"name="prn" required="required"></td></tr>
<tr><td>Time:</td><td><input type="time" name="pad" required="required"></td><tr>
 <tr><td colspan=2 align=center><input type="submit" value='Submit'></td></tr>
<tr><td colspan=2 align=center><input type=reset value='Clear'></td></tr></table>
</form><div>
       <div>
                 <img src="images/services2.jpg"alt="">
        

Saturday, 29 April 2017

Validation for Email, text only, numbers only

Dear All,

See the code

-----------------------------------------------------------------------------------------------------------

<center>
<br><br>
<font color=BLACK>LOGIN   
<script>

function check()
{
    username=document.frm.username.value;
    password=document.frm.password.value;
    if(username=="")
    {
        alert('Enter username');
        document.frm.username.focus();
        return false;
    }
    else if (!/^[a-zA-Z]*$/g.test(username))//Ony a-z characters
     {
        alert("Invalid characters");
        document.frm.username.value='';
        document.frm.username.focus();
        return false;
    }
    else if(!/\S+@\S+\.\S+/.test(password))//Only Email
    {
        alert('Enter email in password');
        document.frm.password.value='';
        document.frm.password.focus();
        return false;
    }
    else if(isNaN(password))//Only numbers
    {
        alert('Enter number in password');
        document.frm.password.value='';
        document.frm.password.focus();
        return false;
    }
   
   
    return true;

   
}
</script>
<form name=frm action="logincheck.php" method=post onsubmit='return check()'>   
<table cellpadding=5>
<form action="logincheck.php" method=post>
<tr><td>USER NAME :<td><input type=text name=username><br>
<tr><td>PASSWORD  :<td><input type=text name=password>
</table>
<input type=submit value=submit>
</form>