Jump to content

How do i validate this forms ?? and give back a feedback


Laguna

Recommended Posts

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<table width="400" border="0">
  <tr>
    <th colspan="2" scope="row"><img src="header.jpg" width="751" height="160"></th>
  </tr>
  <tr>
    <th colspan="2" scope="row" bgColor="#44679c">							<font color="#0099FF">
      <marquee scrolldelay="40" scrollamount="2">
           Online Self Diagnosis & Symptom 
																	Analysis       WEbDiagnosis identifies conditions that 
																	match your symptoms       Performs a complete body check 
																	up     Find out the real cause of your nagging symptoms
      </marquee>
       </font></th>
  </tr>
  
  <tr>
    <th width="134" height="32" scope="row"><a href="home.html"><img src="firstbutton.gif" width="140" height="30"></a></th>
    <td width="613" rowspan="5" align="left" valign="top"><h1 align="center"> </h1>
    <p> </p>
    <p> </p>
    <form name="form1" method="post" action="">
      <label>
      <div align="left">Symptom : 
        <select name="select">
        </select>
      </div>
      </label>
        <p>Symptom :
          <select name="select2">
          </select>
</p>
        <p>Symptom :
          <select name="select3">
          </select>
</p>
        <p> </p>
        <p align="center">
          <label>
          <input name="Submit" type="submit" id="Submit" value="Diagnosis">
          </label>
        </p>
        <p> </p>
    </form>    <p align="center"> </p></td>
  </tr>
  <tr>
    <th height="30" scope="row"><img src="main.gif" width="140" height="30"></th>
  </tr>
  <tr>
    <th height="31" scope="row"><a href="Beforelogin.php"><img src="Real login.gif" width="140" height="30"></a></th>
  </tr>
  
  <tr>
    <th height="36" scope="row"><a href="Admin.html"></a><img src="Register.gif" width="140" height="30"></th>
  </tr>
  
  <tr>
    <th height="191" scope="row"> </th>
  </tr>
</table>

</body>
</html>


 

Well i am creating a Online disease diagnosis system basically if the user selects the above symptom it will

 

then comes out a result

 

You may be having fever or flue if the symptom matches

 

I am having a tough time doing it i have a symptom table which i dont know how to call it out , i have already done login and admin side but i am still stuck to this diagnosis function

 

Can i validate the same way as a login function will work ??

 

<?

include 'config.php';

[color=red]if(!empty($_POST['username']) && !empty($_POST['password']))[/color]
{
$username = $_POST['username'];
$pass   =$_POST['password'];

$sql = "select * from users where 
username = '$username'
and
pass='$pass'";

$qid = mysql_query($sql) or die(mysql_error());
$data = mysql_fetch_array($qid);

if($data)
{
$_SESSION['username'] = $data['username'];
$_SESSION['name'] = $data['name'];
// access level
//$_SESSION['level'] = $data['level'];
$_SESSION['login'] = True;
header('location: index2.php');
exit;

}
else
{
echo 'Username and Password IS WRONG!!!!!';
}
}
//include 'design/header.html';
//include 'design/login.html';
//include 'design/footer.html';

?>

 

can i do it the same way as a login function which now instead it checks for symptom instead of user name and password ??

 

thanks for taking your time  i really need your help anyone

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.