i uploaded this php script in my xhosting public_html
how come i have this fragment error if open list.php
BMK Automobile PArts
Seach for: in Part Number Part Name Description "; $Row = $QueryResult->fetch_row(); do { echo "{$Row[0]}"; echo "{$Row[1]}"; echo "{$Row[2]}"; echo "{$Row[3]}"; echo "{$Row[4]}"; echo "{$Row[5]}"; echo ""; $Row = $QueryResult->fetch_row(); } while ($Row); echo ""; $DBConnect->close(); ?>
my cpanel username is acellec
heres my code:
dbconnect.php
and heres the code for
list.php
how come i have this fragment error if open list.php
BMK Automobile PArts
Seach for: in Part Number Part Name Description "; $Row = $QueryResult->fetch_row(); do { echo "{$Row[0]}"; echo "{$Row[1]}"; echo "{$Row[2]}"; echo "{$Row[3]}"; echo "{$Row[4]}"; echo "{$Row[5]}"; echo ""; $Row = $QueryResult->fetch_row(); } while ($Row); echo ""; $DBConnect->close(); ?>
my cpanel username is acellec
heres my code:
dbconnect.php
PHP:
<?
$DBConnect = mysqli_connect("localhost", "acellec", "15556");
$DBConnect->select_db("acellec_automobileparts");
$QueryResult = $DBConnect->query($SQLstring)
Or die("<p>Unable to execute the query.</p>"."<p>Error code ". $DBConnect->errno . ": " . $DBConnect->error) . "</p>";
?>
list.php
PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Automobile Parts</title>
</head>
<body>
<h1>BMK Automobile PArts</h1>
<form action="search1.php" method="post">
Seach for: <input type="text" name="find" /> in
<Select NAME="field">
<Option VALUE="PartNo">Part Number</option>
<Option VALUE="PartName">Part Name</option>
<Option VALUE="Description">Description</option>
</Select>
<input type="hidden" name="searching" value="yes" />
<input type="submit" name="search" value="Search" />
</form>
<?
$TableName = "automobileparts";
$SQLstring = "SELECT * FROM automobileparts";
require_once("dbconnect.php");
echo "<table width='100%' border='1'>";
$Row = $QueryResult->fetch_row();
do {
echo "<tr><td>{$Row[0]}</td>";
echo "<td align='right'>{$Row[1]}</td>";
echo "<td align='right'>{$Row[2]}</td>";
echo "<td align='right'>{$Row[3]}</td>";
echo "<td align='right'>{$Row[4]}</td>";
echo "<td align='right'>{$Row[5]}</td>";
echo "<td align='right'><a href=\"edit.php?id={$Row[0]}\">Edit</a></td>";
echo "<td align='right'><a href=\"delete.php?id={$Row[0]}\">Delete</a></td>";
echo "</tr>";
$Row = $QueryResult->fetch_row();
} while ($Row);
echo "</table>";
$DBConnect->close();
?>
<p><a href="insert.php">Add Parts</a></p>
</body>
</html>