Похожие чаты

<!DOCTYPE html> <html lang="en"> <head> <title>View</title> <!-- Bootstrap core CSS--> <link

href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom fonts for this template-->
<link href="bootstrap/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<!-- Custom styles for this template-->
<link href="bootstrap/css/apna.css" rel="stylesheet">
</head>

<?php include 'header.php'; ?>
<h1 align="center">DETAILS</h1>
<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '';

$conn = mysql_connect($dbhost, $dbuser, $dbpass);

if(! $conn ) {
die('Could not connect: ' . mysql_error());
}

$sql = 'SELECT VendorCode, ServiceProvider, AMC, ReferenceNo, ServiceFrom, ServiceTo, POAmount, POExpireIn, CurrentStatus, ResponsiblePerson, Remark, Category FROM details';
$sql2='Select role from user';
mysql_select_db('table');
$retval = mysql_query( $sql, $conn );

if(! $retval ) {
die('Could not get data: ' . mysql_error());
}
?> " <table border = '2' align="center">
<?php echo "<tr>";
echo "<th>Vendor Code</th>";
echo "<th>Service Provider</th>";
echo "<th>AMC</th>";
echo "<th>Reference No.</th>";
echo "<th>Service From</th>";
echo "<th>Service To</th>";
echo "<th>PO Amount</th>";
echo "<th>PO ExpireIn</th>";
echo "<th>Current Status</th>";
echo "<th>Responsible Person</th>";
echo "<th>Remark</th>";
echo "<th>Category</th>";
echo "<th>Action</th>";

echo "</tr>";
while($row = mysql_fetch_assoc($retval)) {
if($row['ServiceTo']>date("Y-m-d")){
echo "<tr>";
echo "<td>".$row['VendorCode']. "</td>";
echo "<td>".$row['ServiceProvider']. "</td>";
echo "<td>".$row['AMC']. "</td>";
echo "<td>".$row['ReferenceNo']. "</td>";
echo "<td>".$row['ServiceFrom']. "</td>";
echo "<td>".$row['ServiceTo']. "</td>";
echo "<td>".$row['POAmount']. "</td>";
echo "<td>".$row['POExpireIn']. "</td>";
echo "<td>".$row['CurrentStatus']. "</td>";
echo "<td>".$row['ResponsiblePerson']. "</td>";
echo "<td>".$row['Remark']. "</td>";
echo "<td>".$row['Category']. "</td>";
if($sql2=1){
echo "<td><form action='edit.php' method='POST'><input type='hidden' name='VendorCode' value='".$row["VendorCode"]."'/><input type='submit' name='submit-btn' value='Edit' /></form></td>";
}
echo "</tr>";
}
else{
echo "<tr bgcolor=\"#ff4d4d\">";
echo "<td>".$row['VendorCode']. "</td>";
echo "<td>".$row['ServiceProvider']. "</td>";
echo "<td>".$row['AMC']. "</td>";
echo "<td>".$row['ReferenceNo']. "</td>";
echo "<td>".$row['ServiceFrom']. "</td>";
echo "<td>".$row['ServiceTo']. "</td>";
echo "<td>".$row['POAmount']. "</td>";
echo "<td>".$row['POExpireIn']. "</td>";
echo "<td>".$row['CurrentStatus']. "</td>";
echo "<td>".$row['ResponsiblePerson']. "</td>";
echo "<td>".$row['Remark']. "</td>";
echo "<td>".$row['Category']. "</td>";
if($sql2=1){
echo "<td><form action='edit.php' method='POST'><input type='hidden' name='VendorCode' value='".$row["VendorCode"]."'/><input type='submit' name='submit-btn' value='Edit' /></form></td>";
}
echo "</tr>";

}
} ?>

</table>

<?php
mysql_close($conn);
?>

</html>

2 ответов

11 просмотров

😳 you are using mysql_connect() ? : https://www.php.net/manual/en/function.mysql-connect.php Warning This extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include: mysqli_connect() PDO::__construct()

Don't write like so

Похожие вопросы

Обсуждают сегодня

Ready for some fun AND a chance to win TKO Tokens? Join us for exciting minigames in our Telegram group! 🕒 Don’t miss out—games start on today 25 October 2024, at 8 PM! Ge...
Milkyway | Tokocrypto
255
Мужики и девушки, привет) в Вelphi xe7 в настройках во вкладке "Editor Options" далее " Color" есть список: "Elements", открыв который мы можем настраивать отображение разных...
Kraszx
14
VIP-392 [zkSync] New native USDC market in the Core pool Summary If passed, following the Community proposal “Support native USDC on Venus Core Pool of ZKSync Era” and the a...
Venus Announcements
1
is that okay?
Samurai 🇯🇵
21
Добрый вечер. Есть вопрос, а может и предложение. Был у меня диалог в другой группе о делфи и я задался вопросом: "А нельзя ли в делфи цвет //коментария и {комментария} сде...
Kraszx
24
How about the project bro Likes the community not that active ?
🅿️abby_FX
19
Я вот подумал. SSE выполняет операции максимум с 64-битной точностью. А FPU - всегда с 80-битной. Разве не должно быть FPU точнее тогда?
The Bird of Hermes
13
Guys, Donald Trump or Kamala Harris? It does not matter for Bitcoin in the long run!! 2020 Election: After Joe Biden's victory in November 2020, Bitcoin steadily rose from...
Sabah Shabu
3
как быть с принтером? такой подход прокатит?
zamtmn
12
Мдя, прикол, боевая сборка запускается (именно под отладчиком) после F9 примерно полторы минуты (97 секунд если быть точным). Начал копать - проблема детектится сразу - зависа...
Александр (Rouse_) Багель
38
Карта сайта