- Beranda
- Komunitas
- Tech
- Website, Webmaster, Webdeveloper
[ASK] membuat satu layout dengan PHP


TS
dhanilemio
[ASK] membuat satu layout dengan PHP
sesepuh mohon banget bantuannya....
ane dulu pernah mengajukan pertanyaan dsini...
dan para kaskuser memberi jawaban dan masalah ane pun selesai...
tapi karena kaskusnya baru , threadnya hilang
intinya ane butuh banget tuh thead.
Pertanyaan
ane sudah design web sederhana (toko online)
nah ane mau klo di klik gambar nya keluar halaman detail productnya
tapi kenapa ga bisa ya
mohon sesepuh memberikan pencerahan...
ane dulu pernah mengajukan pertanyaan dsini...
dan para kaskuser memberi jawaban dan masalah ane pun selesai...
tapi karena kaskusnya baru , threadnya hilang
intinya ane butuh banget tuh thead.
Pertanyaan
ane sudah design web sederhana (toko online)
PHP Code:
<?php require ('sql_connect.inc');
//Menghubungi database MySQL kita.
sql_connect(shop);
$query = "SELECT * FROM shop
ORDER
BY id DESC"
;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Free Css Layout</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="css/styles.css" />
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css">
[removed]
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
//-->
[removed]
[removed]
$(document).ready(function() {
$('#content-slider').cycle({
fx: 'fade'
});
});
[removed]
<style type="text/css">
<!--
body,td,th {
color: #76c92c;
text-align: center;
}
body {
background-color: #36C;
}
a:visited {
color: #39F;
}
a:hover {
color: #090;
}
a:active {
color: #FFF;
}
#content-slider {
position: relative;
width: 458px;
height: 180px;
overflow: hidden;
}
#content-slider img {
display: block;
width: 458px;
height: 180px;
}
-->
</style>
</head>
<body style="background-color:#d6d5d5">
<div id="container">
<img src="img/header bola.jpg" width="701" height="128">
<div id=>
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a class="MenuBarItemSubmenu" href="index.php">Home</a></li>
<li><a href="product.html">Product</a></li>
<li><a class="MenuBarItemSubmenu" href="#">Cara Pemesanan</a></li>
<li><a href="#">Pembayaran</a></li>
</ul>
<div id="content">
<p><strong>Featured Products</strong></p>
<p><div id="content-slider">
<img src="homepage_logo.jpg" width="458" height="180"/><img src="slide1.jpg" width="458" height="180" alt="" />
<img src="product_right.jpg" width="458" height="180"/>
</div></p></p>
<?php
$result = mysql_query("SELECT * FROM internet_shop");
while($row=mysql_fetch_assoc($result))
{
echo '<div class="img">
<a href="product.php?id='.$row['id'].'">
<img src="img/products/'.$row['img'].'" alt="'.htmlspecialchars($row['name']).'" width="100" height="100"/>
</a>
';
echo '<div class="desc">'.$row['name'].'</div>';
echo '<div class="cart">Rp'.$row['price'].'</div>';
echo '</div>';
}
?>
</div>
</div>
<div id="navigation">
<p>�</p>
<p><strong>Categories</strong></p>
<ul>
<li><a href="http://www.free-css.com/">Motherboard</a></li>
<li><a href="http://www.free-css.com/">Processor</a></li>
<li><a href="http://www.free-css.com/">VGA Card</a></li>
<li><a href="http://www.free-css.com/">Memory</a></li>
<li><a href="http://www.free-css.com/">Hardisk</a></li>
</ul>
</div>
<div id="extra">
<p><table width="160" border="1" cellspacing="5" cellpadding="10">
<tr>
<th scope="col">Bank</th>
</tr>
</table>
<img src="images/bca_logo.gif" width="57" height="36">
<img src="images/logo_bni.gif" width="57" height="36"> <img src="img/logo mandiri.jpg" width="77" height="36">
</div>
<div id="footer">
<p><center>
Copyright By Dhani Powered By oscablenet.com
</center></p>
</div>
</div>
</body>
</html>
nah ane mau klo di klik gambar nya keluar halaman detail productnya
PHP Code:
<?php require ('sql_connect.inc');
//Menghubungi database MySQL kita.
sql_connect(shop);
$row = mysql_fetch_assoc(mysql_query("SELECT * FROM internet_shop WHERE id='".$id."'"));
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Free Css Layout</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="css/styles_product.css" />
[removed][removed]
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
color: #76c92c;
text-align: center;
}
body {
background-color: #36C;
}
a:visited {
color: #39F;
}
a:hover {
color: #090;
}
a:active {
color: #FFF;
}
-->
</style></head>
<body style="background-color:#d6d5d5">
<div id="container">
<img src="images/header bola.jpg" width="701" height="128">
<div id=>
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a class="MenuBarItemSubmenu" href="index.html">Home</a></li>
<li><a href="product.html">Product</a></li>
<li><a class="MenuBarItemSubmenu" href="#">Cara Pemesanan</a></li>
<li><a href="#">Pembayaran</a></li>
</ul>
<div id="content">
<p><strong>Featured Products</strong></p>
<?php
$result = mysql_query("SELECT * FROM internet_shop");
{
echo '<div class="img"><img src="img/products/'.$id['img'].'" alt="'.htmlspecialchars($row['name']).'" width="180" height="200"/>
</a>
';
echo '</div>';
echo '<div class="ket">';
echo'<strong>Deskripsi</strong><br>';
echo ("<ul>");
echo ("<li>");
echo $row['description'];
echo ("</li>");
echo ("</ul>");
}
?><input name="dhani" type="image" value="beli" src="img/button1.PNG" alt="beli" align="top">
</div>
</div>
<div id="navigation">
<p>�</p>
<p><strong>Categories</strong></p>
<ul>
<li><a href="http://www.free-css.com/">Motherboard</a></li>
<li><a href="http://www.free-css.com/free-css-layouts.php">Processor</a></li>
<li><a href="http://www.free-css.com/free-css-layouts.php">VGA Card</a></li>
<li><a href="http://www.free-css.com/free-css-layouts.php">Memory</a></li>
<li><a href="http://www.free-css.com/free-css-layouts.php">Hardisk</a></li>
</ul>
</div>
<div id="extra">
<p><table width="200" border="1" cellspacing="5" cellpadding="10">
<tr>
<th scope="col">Bank</th>
</tr>
</table>
<img src="images/bca_logo.gif" width="57" height="36">
<img src="images/logo_bni.gif" width="57" height="36"> <img src="images/logo mandiri.jpg" width="77" height="36">
</div>
<div id="footer">
<p><center>
Copyright By Dhani Powered By Oscablenet.com
</center></p>
</div>
</div>
[removed]
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
//-->
[removed]
</body>
</html>
tapi kenapa ga bisa ya
mohon sesepuh memberikan pencerahan...
Diubah oleh dhanilemio 14-11-2012 14:27
0
1.1K
2


Komentar yang asik ya
Urutan
Terbaru
Terlama


Komentar yang asik ya
Komunitas Pilihan