<?
$sql="Select * from tbl_site_setting";
$rs_category = mysql_query($sql);
$edit_home_banner = mysql_result($rs_category,0,str_home_banner);
$edit_home_content = mysql_result($rs_category,0,str_home_content);
$edit_home_product_model_number = mysql_result($rs_category,0,str_home_product_model_number);
if($edit_home_product_model_number!=""){
$sql_home = "select * from tbl_product where str_product_model_no = '$edit_home_product_model_number'";
$rs_home = mysql_query($sql_home);
if(mysql_num_rows($rs_home)>0){
$product_id = mysql_result($rs_home,0,int_product_id);
$link_new = "pro_detail.php?pro_id=".$product_id;
}else{
$link_new = "#";
}
}else{
$sql_home = "select * from tbl_product where str_product_model_no = '$edit_home_product_model_number'";
$rs_home = mysql_query($sql_home);
}
?>
<tr>
<td valign="bottom"><a href="<?=$link_new?>"><img src="images/tnusa_EuroDesigned_txt.gif" border="0" width="420" height="16"></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td height="1" bgcolor="#666666"><img src="images/blank.gif" width="1" height="1"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<table width="100%" height="116" border="0" cellpadding="15" cellspacing="2">
<tr>
<td class="detail-text">
<? if(edit_home_content!=""){?>
<div align="justify">
<?=$edit_home_content?>
</div>
<?}else{?>
<div align="justify">TimeNetUSA.com is
committed to providing our customers with the absolute latest
in fashion design innovation, superior customer service, deep
inventories and the newest laser decorating technology.
</div>
<?}?>
</td>
</tr>
</table>
</td>
<td width="2" background="images/dot_horzvert.gif"><img src="images/blank.gif" width="2" height="1"></td>
<td width="280" align="center" valign="bottom">
<?if($edit_home_banner!=""){?>
<img src="images/uploaded_images/category/<?=$edit_home_banner?>" width="241" height="162">
<?}else{?>
<img src="images/secondary_feature.jpg" width="241" height="162">
<?}?>
<?
if(mysql_num_rows($rs_home)>0){
?>
<br><a href="<?=$link_new?>"><font face="Arial" size="1" color="Red">Click to view this product</font></a>
<?
}
?>
</td>
</tr>
<tr background="images/dot_horzvert.gif">
<td height="2" colspan="3"><img src="images/blank.gif" width="1" height="2"></td>
</tr>
</table>
$sql="Select * from tbl_site_setting";
$rs_category = mysql_query($sql);
$edit_home_banner = mysql_result($rs_category,0,str_home_banner);
$edit_home_content = mysql_result($rs_category,0,str_home_content);
$edit_home_product_model_number = mysql_result($rs_category,0,str_home_product_model_number);
if($edit_home_product_model_number!=""){
$sql_home = "select * from tbl_product where str_product_model_no = '$edit_home_product_model_number'";
$rs_home = mysql_query($sql_home);
if(mysql_num_rows($rs_home)>0){
$product_id = mysql_result($rs_home,0,int_product_id);
$link_new = "pro_detail.php?pro_id=".$product_id;
}else{
$link_new = "#";
}
}else{
$sql_home = "select * from tbl_product where str_product_model_no = '$edit_home_product_model_number'";
$rs_home = mysql_query($sql_home);
}
?>
<tr>
<td valign="bottom"><a href="<?=$link_new?>"><img src="images/tnusa_EuroDesigned_txt.gif" border="0" width="420" height="16"></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td height="1" bgcolor="#666666"><img src="images/blank.gif" width="1" height="1"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<table width="100%" height="116" border="0" cellpadding="15" cellspacing="2">
<tr>
<td class="detail-text">
<? if(edit_home_content!=""){?>
<div align="justify">
<?=$edit_home_content?>
</div>
<?}else{?>
<div align="justify">TimeNetUSA.com is
committed to providing our customers with the absolute latest
in fashion design innovation, superior customer service, deep
inventories and the newest laser decorating technology.
</div>
<?}?>
</td>
</tr>
</table>
</td>
<td width="2" background="images/dot_horzvert.gif"><img src="images/blank.gif" width="2" height="1"></td>
<td width="280" align="center" valign="bottom">
<?if($edit_home_banner!=""){?>
<img src="images/uploaded_images/category/<?=$edit_home_banner?>" width="241" height="162">
<?}else{?>
<img src="images/secondary_feature.jpg" width="241" height="162">
<?}?>
<?
if(mysql_num_rows($rs_home)>0){
?>
<br><a href="<?=$link_new?>"><font face="Arial" size="1" color="Red">Click to view this product</font></a>
<?
}
?>
</td>
</tr>
<tr background="images/dot_horzvert.gif">
<td height="2" colspan="3"><img src="images/blank.gif" width="1" height="2"></td>
</tr>
</table>
解决方案 »
- 如何在while循环内使用“php函数”控制输出“s”2-3次
- 请问个关于上传图片的问题!会的朋友帮忙看一下!
- PHP 如何获取网址里的数据
- 提示这个错误: Fatal error: Call to undefined function: mssql_pconnect()
- 请指点,为什么我这个正则会出现乱码?在线等...,谢谢
- 大大们好,第一次问问题在这里
- 哪儿有下载php_iconv.dll
- 100分相送,关于IIS+mysql+php的配置
- 关于表单提交的问题???
- php使用curl获取跳转后的网址设置url地址的问题
- 如何抓取POST传递的结果页面
- ADODB类的分页功能的使用问题!!!!!急!!!
$sql="Select * from tbl_site_setting";
$rs_category = mysql_query($sql);
$edit_home_banner = mysql_result($rs_category,0,str_home_banner);
$edit_home_content = mysql_result($rs_category,0,str_home_content);
$edit_home_product_model_number = mysql_result($rs_category,0,str_home_product_model_number);if($edit_home_product_model_number!=""){
$sql_home = "select * from tbl_product where str_product_model_no = '$edit_home_product_model_number'";
$rs_home = mysql_query($sql_home);
if(mysql_num_rows($rs_home)>0){
$product_id = mysql_result($rs_home,0,int_product_id);
$link_new = "pro_detail.php?pro_id=".$product_id;
}else{
$link_new = "#";
}
}else{
$sql_home = "select * from tbl_product where str_product_model_no = '$edit_home_product_model_number'";
$rs_home = mysql_query($sql_home);
}
?>======================================================================================================================
<%
set rs=conn.execute("Select * from tbl_site_setting")
edit_home_banner = rs("str_home_banner")
edit_home_content = rs("str_home_content")
edit_home_product_model_number = rs("str_home_product_model_number")if edit_home_product_model_number<>"" then
set rs=conn.execute("select * from tbl_product where str_product_model_no = '"&edit_home_product_model_number&"'")
if not rs.eof then
product_id = rs("int_product_id")
link_new = "pro_detail.php?pro_id="&product_id
else
link_new="#"
end if
set rs_home = conn.execute("select * from tbl_product where str_product_model_no = '"&edit_home_product_model_number&"'")
%>
我觉得你的逻辑有点问题
我没调试哈
大概应该没啥问题最后缺少一个end if