|
|
|
ช่วยดูโค๊ดส่วนนี้ให้หน่อยครับแสดงรูป มันไม่ยอมแสดงรูปอ่าคับมันเป็นตัวเครื่องหมายห้ามเข้าของจราจร |
|
|
|
|
|
|
|
echo "<tr><td>IMAGE</td><td align='center'><b><font color='#000000'>
<img src='../$row[imgpro]' width='300'> </font></b></td></tr>";
ลองยังครับ
|
|
|
|
|
Date :
2009-10-06 16:21:44 |
By :
Sek-Artdrinker |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ลองทำตามที่พี่ Sek-Artdrinker
และลองเช็ค path ของไฟล์รูปให้ถูกต้องด้วยนะครับ
ส่วนข้างลางเป็นทางเลือกนะครับ เวลาแก้ไขจะได้ดูง่ายๆ อ่ะ
Code (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=windows-874" />
<title>:: จัดระเบียบสังคมครับ ::</title>
<style>
.tableStyle{
font-size: 10pt;
background:#cd853f;
border:1px #000000;
border-collapse:collapse;
color:#e8e8e8;
}
</style>
</head>
<body>
<?php
$strSQL = "INSERT INTO preview ";
$strSQL .="(name,Name,Email,CountryCode,Budget,Used) ";
$strSQL .="VALUES ";
$strSQL .="('".$_POST["name"]."')";
?>
<?
include "connect.php";
$member=$_POST[ddlname];
$cdmp3=$_POST[ddlcdmp3type];
$monitor=$_POST[ddlmonitor];
$spaeker=$_POST[ddlspaeker];
$amp=$_POST[ddlamp];
$subwoofer=$_POST[ddlsubwoofer];
//mp3//
if ($cdmp3!=""){
$sql = "select * from cdmp3type where cdmp3type_id = '$cdmp3'";
$result = mysql_db_query($dbname,$sql);
$num = mysql_num_rows($result);
if ($num>0){
while($row=mysql_fetch_array($result)){
$namepro=$row[cdmp3type_name];
$playpro=$row[play];
$hightpower=$row[hightpower];
$pricepro=$row[pricecdmp3];
$imgpro=$row[cdmp3_img];
$chip=$row[chip];
$preout=$row[preout];
$usb=$row[usb];
$ipod=$row[ipod];
$bluetooth=$row[bluetooth];
$other=$row[other];
}
}
$sql = "INSERT INTO priview (name_pro, price_pro) VALUES ('$namepro', '$pricepro')";
$result=mysql_db_query($dbname,$sql);
if ($result){ ?>
<table width="500" align="center" class="tableStyle">
<tr>
<td>TYPE</td>
<td align='center'><b><font color='#000000'>
<?=$row["$namepro"]?>
</font></b></td>
</tr>
<tr>
<td>PLAYER</td>
<td align='center'><b><font color='#000000'>
<?=$row["$playpro"]?>
</font></b></td>
</tr>
<tr>
<td>HIGHT POWER</td>
<td align='center'><b><font color='#000000'>
<?=$row["$hightpower"]?>
</font></b></td>
</tr>
<tr>
<td>CHIP</td>
<td align='center'><b><font color='#000000'>
<?=$row["$chip"]?>
</font></b></td>
</tr>
<tr>
<td>PREOUT</td>
<td align='center'><b><font color='#000000'>
<?=$row["$preout"]?>
</font></b></td>
</tr>
<tr>
<td>USB</td>
<td align='center'><b><font color='#000000'>
<?=$row["$usb"]?>
</font></b></td>
</tr>
<tr>
<td>Ipod</td>
<td align='center'><b><font color='#000000'>
<?=$row["$ipod"]?>
</font></b></td>
</tr>
<tr>
<td>BLUETOOTH</td>
<td align='center'><b><font color='#000000'>
<?=$row["$bluetooth"]?>
</font></b></td>
</tr>
<tr>
<td>OTHER</td>
<td align='center'><b><font color='#000000'>
<?=$row["$other"]?>
</font></b></td>
</tr>
<u>
<tr>
<td>IMAGE</td>
<td align='center'><b><font color='#000000'> <img src="<?=$row["imgpro"]?>" width='300'> </font></b></td>
</tr>
</u>
</table>
<? }else{ ?>
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="50" align='center'><font color='red'> <b>เพิ่มข้อมูล $namepro ไม่สำเร็จ</b> </font></td>
</tr>
</table>
<? }
}
?>
</body>
</html>
|
|
|
|
|
Date :
2009-10-06 16:53:01 |
By :
pokultra |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
path ของไฟล์รูป เช็คยังไงคับ
ผมทำแล้วมันไม่ออกมาเหมือนเดิมน่ะคับผมน่าจะผิดที่ตรงไหนซักที่
แต่ผมหาไม่เจอ
|
|
|
|
|
Date :
2009-10-06 17:47:12 |
By :
manowsjidd |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
เช่นๆๆๆๆๆๆๆๆเป็นตัวอย่างล่ะกัน
Code (PHP)
$im="image/{$row['imagename']}";
if(file_exists($im)) {
echo"<img src='image/$row['imagename']'>";
}
เป็นการเช็คชื่อภาพว่ามีอยู่จริงหรือไม่ถ้ามีก็ให้แสดงรูปภาพนั้น
|
|
|
|
|
Date :
2009-10-06 19:29:32 |
By :
somparn |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<?php
session_start() ;
if(!session_is_registered("login_true")) {
echo "<meta http-equiv='refresh' content='0;url=index.php'>" ;
exit() ;
}
?>
<?
include ("font.php");
?>
<html>
<head>
<title>::SHOPPING::</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="E8E8E8">
<strong><font color="#FF6633" size="3" face="MS Sans Serif, Tahoma, sans-serif"><center>
<?php
include("config.inc.php") ;
mysql_select_db($db) ;
$result = mysql_query("select * from member where user='$login_true'") or die ("Err Can not to result") ;
$dbarr = mysql_fetch_array($result) ;
?>
สวัสดี <?php echo $dbarr['name'] ; ?> ท่านได้สั่งซื้อ <p>
</center></font> </strong>
<?
$strSQL = "INSERT INTO preview ";
$strSQL .="(name,Name,Email,CountryCode,Budget,Used) ";
$strSQL .="VALUES ";
$strSQL .="('".$_POST["name"]."')";
?>
<?
include "connect.php";
$member=$_POST[ddlname];
$cdmp3=$_POST[ddlcdmp3type];
$monitor=$_POST[ddlmonitor];
$spaeker=$_POST[ddlspaeker];
$amp=$_POST[ddlamp];
$subwoofer=$_POST[ddlsubwoofer];
//mp3//
if ($cdmp3!=""){
$sql = "select * from cdmp3type where cdmp3type_id = '$cdmp3'";
$result = mysql_db_query($dbname,$sql);
$num = mysql_num_rows($result);
if ($num>0){
while($row=mysql_fetch_array($result)){
$namepro=$row[cdmp3type_name];
$playpro=$row[play];
$hightpower=$row[hightpower];
$pricepro=$row[pricecdmp3];
$imgpro=$row[cdmp3_img];
$chip=$row[chip];
$preout=$row[preout];
$usb=$row[usb];
$ipod=$row[ipod];
$bluetooth=$row[bluetooth];
$other=$row[other];
}
}
$sql = "INSERT INTO priview (name_pro, price_pro) VALUES ('$namepro', '$pricepro')";
$result=mysql_db_query($dbname,$sql);
if ($result){
echo '<br><table width="500" align="center" border="1" style=" border-collapse:collapse;" style="font-size: 10pt; color:#e8e8e8" bordercolor="#000000" bgcolor="#cd853f">';
echo "<tr><td>TYPE</td><td align='center'><b><font color='#000000'> $namepro </font></b></td></tr>";
echo "<tr><td>PLAYER</td><td align='center'><b><font color='#000000'> $playpro </font></b></td></tr>";
echo "<tr><td>HIGHT POWER</td><td align='center'><b><font color='#000000'>$hightpower </font></b></td></tr>";
echo "<tr><td>CHIP</td><td align='center'><b><font color='#000000'> $chip </font></b></td></tr>";
echo "<tr><td>PREOUT</td><td align='center'><b><font color='#000000'> $preout </font></b></td></tr>";
echo "<tr><td>USB</td><td align='center'><b><font color='#000000'> $usb </font></b></td></tr>";
echo "<tr><td>Ipod</td><td align='center'><b><font color='#000000'> $ipod </font></b></td></tr>";
echo "<tr><td>BLUETOOTH</td><td align='center'><b><font color='#000000'> $bluetooth </font></b></td></tr>";
echo "<tr><td>OTHER</td><td align='center'><b><font color='#000000'> $other </font></b></td></tr>";
echo "<tr><td>IMAGE</td><td align='center'><b><font color='#000000'><img src='product/$row[imgpro]' width='300'> </font></b></td></tr>";
echo "</table>";
}else{
echo "<tr><td align='center'><font color='red'><br><b>เพิ่มข้อมูล $namepro ไม่สำเร็จ</b><br></font></td></tr>";
}
}
//monitor//
if ($monitor!=""){
$sql = "select * from monitortype where monitortype_id = '$monitor'";
$result = mysql_db_query($dbname,$sql);
$num = mysql_num_rows($result);
if ($num>0){
while($row=mysql_fetch_array($result)){
$namepro=$row[monitortype_name];
$pricepro=$row[pricemonitor];
$playpro=$row[play];
$hightpower=$row[hightpower];
$size=$row[size];
$type=$row[type];
$pricepro=$row[pricecdmp3];
$imgpro=$row[monitor_img];
$chip=$row[chip];
$preout=$row[preout];
$usb=$row[usb];
$ipod=$row[ipod];
$bluetooth=$row[bluetooth];
$other=$row[other];
}
}
$sql = "INSERT INTO priview (name_pro, price_pro) VALUES ('$namepro', '$pricepro')";
$result=mysql_db_query($dbname,$sql);
if ($result){
echo '<br><table width="500" align="center" border="1" style=" border-collapse:collapse;" style="font-size: 10pt; color:#e8e8e8" bordercolor="#000000" bgcolor="#cd853f">';
echo "<tr><td>TYPE</td><td align='center'><b><font color='#000000'> $namepro </font></b></td></tr>";
echo "<tr><td>PLAYER</td><td align='center'><b><font color='#000000'> $playpro </font></b></td></tr>";
echo "<tr><td>HIGHT POWER</td><td align='center'><b><font color='#000000'>$hightpower </font></b></td></tr>";
echo "<tr><td>CHIP</td><td align='center'><b><font color='#000000'> $chip </font></b></td></tr>";
echo "<tr><td>PREOUT</td><td align='center'><b><font color='#000000'> $preout </font></b></td></tr>";
echo "<tr><td>USB</td><td align='center'><b><font color='#000000'> $usb </font></b></td></tr>";
echo "<tr><td>Ipod</td><td align='center'><b><font color='#000000'> $ipod </font></b></td></tr>";
echo "<tr><td>BLUETOOTH</td><td align='center'><b><font color='#000000'> $bluetooth </font></b></td></tr>";
echo "<tr><td>OTHER</td><td align='center'><b><font color='#000000'> $other </font></b></td></tr>";
echo "</table>";
}else{
echo "<tr><td align='center'><font color='red'><br><b>เพิ่มข้อมูล $namepro ไม่สำเร็จ</b><br></font></td></tr>";
}
}
//speaker//
if ($spaeker!=""){
$sql = "select * from spaekertype where spaekertype_id = '$spaeker'";
$result = mysql_db_query($dbname,$sql);
$num = mysql_num_rows($result);
if ($num>0){
while($row=mysql_fetch_array($result)){
$namepro=$row[spaekertype_name];
$pricepro=$row[pricespaeker];
$size=$row[size];
$type=$row[type];
$powerwatt=$row[powerwatt];
}
}
$sql = "INSERT INTO priview (name_pro, price_pro) VALUES ('$namepro', '$pricepro')";
$result=mysql_db_query($dbname,$sql);
if ($result){
echo '<br><table width="500" align="center" border="1" style=" border-collapse:collapse;" style="font-size: 10pt; color:#e8e8e8" bordercolor="#000000" bgcolor="#cd853f">';
echo "<tr><td>BRAND TYPE</td><td align='center'><b><font color='#000000'> $namepro </font></b></td></tr>";
echo "<tr><td>SIZE</td><td align='center'><b><font color='#000000'> $size </font></b></td></tr>";
echo "<tr><td>TYPE</td><td align='center'><b><font color='#000000'>$type </font></b></td></tr>";
echo "<tr><td>POWER WATT</td><td align='center'><b><font color='#000000'> $powerwatt </font></b></td></tr>";
echo "</table>";
}else{
echo "<tr><td align='center'><font color='red'><br><b>เพิ่มข้อมูล $namepro ไม่สำเร็จ</b><br></font></td></tr>";
}
}
//power amp//
if ($amp!=""){
$sql = "select * from amptype where amptype_id = '$amp'";
$result = mysql_db_query($dbname,$sql);
$num = mysql_num_rows($result);
if ($num>0){
while($row=mysql_fetch_array($result)){
$namepro=$row[amptype_name];
$pricepro=$row[priceamp];
$clas=$row[clas];
$channel=$row[channel];
$powerwatt=$row[powerwatt];
$other=$row[other];
$amp_img=$row[amp_img];
}
}
$sql = "INSERT INTO priview (name_pro, price_pro) VALUES ('$namepro', '$pricepro')";
$result=mysql_db_query($dbname,$sql);
if ($result){
echo '<br><table width="500" align="center" border="1" style=" border-collapse:collapse;" style="font-size: 10pt; color:#e8e8e8" bordercolor="#000000" bgcolor="#cd853f">';
echo "<tr><td>TYPE</td><td align='center'><b><font color='#000000'> $namepro </font></b></td></tr>";
echo "<tr><td>CLASS</td><td align='center'><b><font color='#000000'> $clas </font></b></td></tr>";
echo "<tr><td>CHANNEL</td><td align='center'><b><font color='#000000'>$channel </font></b></td></tr>";
echo "<tr><td>POWER WATT</td><td align='center'><b><font color='#000000'> $powerwatt </font></b></td></tr>";
echo "<tr><td>OTHER</td><td align='center'><b><font color='#000000'> $other </font></b></td></tr>";
echo "<tr><td>IMAGE</td><td align='center'><b><font color='#000000'> $amp_img </font></b></td></tr>";
echo "</table>";
}else{
echo "<tr><td align='center'><font color='red'><br><b>เพิ่มข้อมูล $namepro ไม่สำเร็จ</b><br></font></td></tr>";
}
}
//subwoofer//
if ($subwoofer!=""){
$sql = "select * from subwoofertype where subwoofertype_id = '$subwoofer'";
$result = mysql_db_query($dbname,$sql);
$num = mysql_num_rows($result);
if ($num>0){
while($row=mysql_fetch_array($result)){
$namepro=$row[subwoofertype_name];
$pricepro=$row[pricesubwoofertype];
$size=$row[size];
$powerwatt=$row[powerwatt];
$vioce=$row[vioce];
$subwoofer_img=$row[subwoofer_img];
}
}
$sql = "INSERT INTO priview (name_pro, price_pro) VALUES ('$namepro', '$pricepro')";
$result=mysql_db_query($dbname,$sql);
if ($result){
echo '<br><table width="500" align="center" border="1" style=" border-collapse:collapse;" style="font-size: 10pt; color:#e8e8e8" bordercolor="#000000" bgcolor="#cd853f">';
echo "<tr><td>TYPE</td><td align='center'><b><font color='#000000'> $namepro </font></b></td></tr>";
echo "<tr><td>SIZE</td><td align='center'><b><font color='#000000'> $size </font></b></td></tr>";
echo "<tr><td>POWER WATT</td><td align='center'><b><font color='#000000'>$powerwatt </font></b></td></tr>";
echo "<tr><td>VIOCE</td><td align='center'><b><font color='#000000'> $vioce </font></b></td></tr>";
echo "<tr><td>IMAGE</td><td align='center'><b><font color='#000000'> $subwoofer_img </font></b></td></tr>";
echo "</table>";
}else{
echo "<tr><td align='center'><font color='red'><br><b>เพิ่มข้อมูล $namepro ไม่สำเร็จ</b><br></font></td></tr>";
}
}
?>
<center><b>ท่านสามารถนำรถของท่านมาติดตั้งทางร้านของเราได้เลยค่ะ</b></center>
<?
include ("rear.php");
?>
นี้คือของผมทั้งหน้านะคับ ทำยังไงมันก็ยังไม่โชว์รูป
|
|
|
|
|
Date :
2009-10-06 20:28:00 |
By :
manowsjidd |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ทำมัยถึงได้เก่งกันจัง
อยากเก่งบ้างงงงงง
|
|
|
|
|
Date :
2009-10-06 20:34:08 |
By :
muavon |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
แน่ใจเปล่าครับในโฟลเดอร์มีรูป ?
แน่ใจเปล่าครับในฐานข้อมูลมีชื่อรูปจริง ?
แน่ใจเปล่าครับชื่อรูปในฐานข้อมูลตรงกับชื่อรูปในโฟลเดอร์?
แน่ใจเปล่าครับตอนเรียกดูชื่อรูป ชื่อของฟิลด์รูปถูกต้อง?
|
|
|
|
|
Date :
2009-10-06 20:52:22 |
By :
xbeginner01 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 ข้อนี้ช่วยได้เยอะเลยครับ
ขอบคุณมากครับ
|
|
|
|
|
Date :
2009-10-06 22:19:29 |
By :
manowsjidd |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|