<?php $con = mysql_connect("localhost", "root", ''); if (!$con) { die('cannot make connection'); } mysql_select_db('yumbox_table', $con) or die('cannot make connection'); $username = $_post['user_name']; $password = $_post['password']; $type = $_post['user_type']; $data = mysql_query("select * users ") or die(mysql_error()); $info = mysql_fetch_array($data); $count = mysql_numrows($info); if ($count==1) { echo ("success!!"); } else { echo ("big friggin failure!!"); } mysql_close($con); ?>
whenever try run code, these big beautiful error messages:
( ! ) notice: undefined index: user_name in c:\wamp\www\login.php on line 14 call stack # time memory function location 1 0.0008 370104 {main}( ) ..\login.php:0 ( ! ) notice: undefined index: password in c:\wamp\www\login.php on line 15 call stack # time memory function location 1 0.0008 370104 {main}( ) ..\login.php:0 ( ! ) notice: undefined index: user_type in c:\wamp\www\login.php on line 16 call stack # time memory function location 1 0.0008 370104 {main}( ) ..\login.php:0 ( ! ) warning: mysql_numrows() expects parameter 1 resource, array given in c:\wamp\www\login.php on line 22 call stack # time memory function location 1 0.0008 370104 {main}( ) ..\login.php:0 2 0.0157 380104 mysql_numrows ( ) ..\login.php:22
i have been pulling hair out trying figure out meaning behind these , fix them, , sadly have seen no solutions. can out there help?
either post doesn't contain variables in question, or aren't performing post in first place.
Comments
Post a Comment