Jump to content

Laguna

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Laguna's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. oo i know i miss the if (!is_numeric($_POST['temp'])) { echo "Temperature should be numeric"; $ready = false; } but the problem is now it doesnt run this statement if ($ready) { if ($_POST['temp']>37.5 && isset($_POST['running_nose'])) echo "You probably have cold."; } must i declare $ready ??
  2. <? //if the form is submitted, process user input if (isset($_POST['submitted'])) { //verify user input $result = true; if (is_numeric($_POST['temp'])) { echo "Temperature should be numeric"; $ready = false; } //check as many conditions as you like if ($_POST['temp']>42 || $_POST['temp']<30) { echo "You should be dead by now."; $ready = false; } //if all's well, process data if ($ready) { if ($_POST['temp']>37.5 && isset($_POST['running_nose'])) echo "You probably have cold."; } else DrawForm(); //data wasn't validated, so draw the form once again } else //form isn't submitted yet, so draw the form { DrawForm(); } function DrawForm() { include'testdiagnosis.php'; } ?>
  3. Can anyone tell me why when put in numbers it still says temperature is numeric ??
  4. it still says temperature is numeric
  5. i put in 42 for the input and it says Tempature should be numeric how come 42 is not numeric ?? [attachment deleted by admin]
  6. Why is it not validating ?? <form id="form1" name="form1" method="post" action="DiagnosisSoup.php"> <div align="center">Temeprature <label> <input type="text" name="temp" /> </label> <p> <label> <input type="checkbox" name="running_nose" value="checkbox" /> Running nose</label> </p> <p> <label> <input type="submit" name="submitted" value="Submit" /> </label> </p> </div> </form> <? //if the form is submitted, process user input if (isset($_POST['submitted'])) { //verify user input $result = true; if (is_numeric($_POST['temp'])) { echo "Temperature should be numeric"; $ready = false; } //check as many conditions as you like if ($_POST['temp']>42 || $_POST['temp']<30) { echo "You should be dead by now."; $ready = false; } //if all's well, process data if ($ready) { if ($_POST['temp']>37.5 && isset($_POST['running_nose'])) echo "You probably have cold."; } else DrawForm(); //data wasn't validated, so draw the form once again } else //form isn't submitted yet, so draw the form { DrawForm(); } function DrawForm() { include'testdiagnosis.php'; } ?> can anyone help ??
  7. <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
  8. OKay problem solve by my self admin you can kill this topic
  9. I have problem displaying the embedded files in table can anyone help me figure it out ? the code is here <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <table width="5551" height="415" border="0"> <tr> <td height="176" colspan="5"><img src="freshlycook.gif" width="960" height="174" /></td> </tr> <tr> <td width="91" height="32"> </td> <td width="892"> </td> <td width="2292"> </td> <td width="2250"> </td> <td width="4"> </td> </tr> <tr> <td height="165"> </td> <td colspan="4"><table width="400" border="0"> <tr> <td><p><embed src="http://apps.rockyou.com/rockyou.swf?instanceid=64261630&ver=102906" quality="high" salign="lt" width="256" height="192" wmode="transparent" name="rockyou" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/></embed><br><img src="http://apps.rockyou.com/dot/SS/A1BF-1.gif?id=64261630"><a href="http://www.rockyou.com?type=slideshow&refid=64261630"><img style="border:0px;" src="http://apps.rockyou.com/images/tail_logo.gif"></a><a target="_BLANK" href="http://www.rockyou.com/slideshow-create.php?refid=64261630"><img style="border:0px;" src="http://apps.rockyou.com/images/tail_create.gif"></a> </embed> <br /></p> </p> <p></p> <p> </p></td> </tr> </table> <p> </p> <pre> </pre></td> </tr> </table> </body> </html> As you can see in the picture the slide show doesnt come out i dont understand it only shows the embed code and not the slide shows............. can some body ? help me [attachment deleted by admin]
×
×
  • 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.