gcxlovexxx Posted September 8, 2013 Share Posted September 8, 2013 The problem is : Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:xampphtdocstestinsertsearch.php on line 12 This is my code search.php <?php $con=mysqli_connect("localhost",'root',"","projectt"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $result = mysqli_query($con,"SELECT * FROM order WHERE orderCode= '$_POST[firstname]'"); while($row = mysqli_fetch_array($result)) { echo $row['orderCode'] . " " . $row['orderCode']; echo "<br>"; } ?> this is trysearch.php <html> <body> <form action="search.php" method="post" enctype="multipart/form-data"> Firstname: <input type="text" name="firstname"> <input type="submit"> </form> </body> </html> thx for help Link to comment Share on other sites More sharing options...
Ingolme Posted September 8, 2013 Share Posted September 8, 2013 We get this question so often we have a pinned thread for it: http://w3schools.invisionzone.com/index.php?showtopic=44106 1 Link to comment Share on other sites More sharing options...
gcxlovexxx Posted September 8, 2013 Author Share Posted September 8, 2013 i will try it... thank you Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now