Jump to content

mannrazz

New Members
  • Posts

    1
  • Joined

  • Last visited

mannrazz's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. predict.php <body> <!--contact form start here--> <h1>Smart Medical Application</h1> <div class="contact"> <div class="contact-top"> <h2>PREDICTION - Enter Your Symptom</h2> </div> <div class="fiel"> <form> <form action="what.php" method = "post" > <input placeholder="First Symptom" name = "first" type="text" > <input placeholder="Second Symptom" name = "second" type="text" > <input placeholder="Third Symptom" name = "third" type="text" > </form> </div> <div class="send"> <form> <input type="submit" name="submit" value="PREDICT!"/> </form> <br></br> <a href="../main/main.php"><button>BACK</button></a> </div> </div> <div class="copyright"> <p>© 2015 All rights reserved | MannRazz Dev Team</p> </div> <!--contact form end here--> </body> what.php <?php $first = $_POST['first']; $second = $_POST['second']; $first = stripcslashes($first); $second = stripcslashes($second); $first = mysql_real_escape_string($first); $second = mysql_real_escape_string($second); mysql_connect("localhost", "root", ""); mysql_select_db("predict"); $result = mysql_query("SELECT * FROM predict WHERE first = '$first' AND second = '$second'"); or die ("Failed to query database".mysql_error()); $row = mysql_fetch_array($result); if ($row['first'] == $first && $row['second'] == $second) { echo "LOGIN SUCCES WELCOME ".$row['first']; } else { "Failed to login"; } ?> **** - i want to conect with the database when both of the query is correct.. and when both is correct... i wanted to call and display the third data from the database (etc : welcome, SAM - SAM is the data that i wanted to call) but it seem doesnt working at the moments... any help will be much appreciated....thanz
×
×
  • 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.