I'm getting errors now when i submit my form Why am I not seeing any results?
These are the error messages that I'm receiving. Not Sure why. These are the error messages that I'm receiving. Not Sure why.
( ! ) Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\wamp\www\1form.php on line 22
Call Stack
# Time Memory Function Location
1 0.0000 244864 {main}( ) ..\1form.php:0
2 0.0010 254352 mysql_query ( ) ..\1form.php:22
( ! ) Warning: mysql_result() expects at least 2 parameters, 1 given in C:\wamp\www\1form.php on line 25
Call Stack
# Time Memory Function Location
1 0.0000 244864 {main}( ) ..\1form.php:0
2 0.0120 262464 mysql_result ( ) ..\1form.php:25
:)
<html>
<head>
<form method="post" action="1form.php">
<label for="textfield">Nino ID:</label>
<input type="text" name="ninoid" id="ninoid">
<input type="submit" name="submit" id="submit" value="Submit">
</form>
<?php
if (isset($_POST['submit'])) {
//connect to the database
include ('connect.php');
$ninoid = ($_POST['ninoid']);
$query = "SELECT ninoid FROM nino WHERE ninoid = '$ninoid';";
$result = mysql_query("SELECT ninoid FROM nino WHERE ninoid = '$ninoid';");
echo mysql_result($result);
}
?>