Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8886117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:28:48+00:00 2026-06-14T21:28:48+00:00

I’ve got an html file that creates a form that links to a php

  • 0

I’ve got an html file that creates a form that links to a php file and allows a multi-parameter search of a database. For whatever reason, the file isn’t reading and I’m getting an error, making it difficult to test my sql query and verify that it works. Thanks in advance.

Here’s the code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>

<title>Bicycle Store Employees</title>
<link rel="stylesheet" type="text/css" href="web.css" />

</head>
<body>

<h1>Bicycle Store Manager</h1>

<h2>Customized Business Management for Bicycle Stores</h2>

<h3>EMPLOYEE INFORMATION</h3>

<?php

ini_set('display_errors', 'On');

$mysqli = new mysqli("$database", "$username", "$password", "$username");

if ($mysqli->connect_errno) {

print "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;

}
if( $_POST["submit"] ) {

    if (!($stmt =$mysqli->prepare("SELECT * into tempTable FROM 
(SELECT Fname, Minit, Lname, Address, Hourly, Sname, Saddress, Dno
FROM EMPLOYEE
join on Employee.Dno = DEPARTMENT.Dnumber
join on LOCATION.Store_num = DEPARTMENT.Store_num
where Fname = $_POST['Fname'] OR Lname = $_POST['Lname'] 
OR Stor_num = $_POST['Store_num'] OR Dno = $_POST['Dno']
GROUP BY Store_num);"))) {

print "Prepare failed: (" . $mysqli->errno . ") " . $mysqli->error;
}
if (!$stmt->bind_param("ssii",$_POST['Fname'], $_POST['Lname'], $_POST['Dno'], $_POST['Store_num'])) {
print "Binding parameters failed: (" . $stmt->errno . ") " . $stmt->error;
}
if (!$stmt->execute()) {
print "Execute failed: (" . $stmt->errno . ") " . $stmt->error;
}
 $stmt->store_result();

if (!$stmt->bind_result($Fname,$Minit,$Lname,$Phone,$Address,$Slocation,$Saddress,$Dno,$Hourly)) {
    print "Binding output parameters failed: (" . $stmt->errno . ") " . $stmt->error;
}
if ($stmt->num_rows == 0){
print "No results were found for the following search <p>"
  .$_POST['Fname'].$_POST['Lname'].$_POST ['Store_num'].$_POST['Dno']."</p>";
    }
else {
print "<table border=2 cellpadding=4>

        <tr bgcolor=white>

        <th>First Name</th>

        <th>Middle Initial</th>

        <th>Last Name</th>

        <th>Phone</th>

        <th>Address</th>

        <th>Store</th>

        <th>Store Location</th>

        <th>Dept #</th>

        <th>Hourly Rate</th>

        </tr>";

    while ($stmt->fetch()){

        print "<tr><td>".$Fname."</td><td>".$Minit."</td><td>".$Lname.

        "</td><td>".$Phone."</td><td>".$Address."</td><td>".$Slocation."</td>

        <td>".$Saddress."</td><td>".$Dno."</td><td>".$Hourly."</td></tr>";

    }

    print "</table>";
}

$stmt->free_result();
}

$mysqli->close();
?>


<p><a href="employee_info.html">SEARCH AGAIN</a></p>

<p><a href="index.html">HOME</a></p>

</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:28:50+00:00Added an answer on June 14, 2026 at 9:28 pm

    Take a Look.

    mysqli_error,mysqli::$error

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
i got an object with contents of html markup in it, for example: string
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have a reasonable size flat file database of text documents mostly saved in
I'm trying to create an if statement in PHP that prevents a single post
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.