Jump to content
php.lv forumi

Datu filtreesana


gkazhus

Recommended Posts

Man ir probleema ar filtresanas php. Man ir dropdown menu kuraa ir ,manaa gadiijumaa memberi. Bet izveeloties attieciigo memberi neatrod siikaakas detaljas par vinju

 

 

<?php
/* Include Files *********************/
//include("banners/database.php");
mysql_connect("hosts", "user", "pwd") or die("Connection Failed");
mysql_select_db("DB")or die("Connection Failed");
?>
<?php

if (isset($_POST["memberIndustries"])) {
$memberIndustries = mysql_real_escape_string ($_POST["memberIndustries"]);

$sqlQuery = "SELECT * FROM Members WHERE member= "$memberIndustries"";

$result = mysql_query($sqlQuery) or die (mysql_error());

while ($myrowe = mysql_fetch_array($result)) {?>
<? // if new member, label it 
//$todays_date = date("Y-m-d");
//$dateCompare = $myrowe[Creation_Date]+30;
//$dateCompare = strtotime(date("Y-m-d", strtotime($myrowe[Creation_Date])) . " +30 days");
//if(strtotime($todays_date)<=$dateCompare){
?>
<table width="100%">
<tr>
<td align="right">
			<img src="/members/new.gif">
</td>
</tr>
</table>
<? //}?>

<? if($myrowe[LOGO_lnk]!='') {?>
<img src="<? echo $myrowe[LOGO_lnk]; ?>">
<? } ?>
<br /> <br /> 
<font style="font-family: Arial; font-size: 10.5pt; font-weight:bold;color:#C1121F">
<? echo $myrowe[Company_Title];?>
</font>
<? if($myrowe[Person_Name_1]!='') {?>
<br />
<font style="font-family: Arial; font-size: 8.5pt; font-weight:bold;color:#000000"><? echo $myrowe[Person_Name_1];?></font>
<font style="font-family: Arial; font-size: 8.5pt; font-weight:bold;color:#000000"><? echo $myrowe[Person_Title_1];?></font>
<? } 
if($myrowe[Person_Name_2]!='') {?>
<br />
<font style="font-family: Arial; font-size: 8.5pt; font-weight:bold;color:#000000"><? echo $myrowe[Person_Name_2];?></font>
<font style="font-family: Arial; font-size: 8.5pt; font-weight:bold;color:#000000"><? echo $myrowe[Person_Title_2];?></font>
<? } 
if($myrowe[Person_Name_2]!='') {?>
<br />
<font style="font-family: Arial; font-size: 8.5pt; font-weight:bold;color:#000000"><? echo $myrowe[Person_Name_3];?></font>
<font style="font-family: Arial; font-size: 8.5pt; font-weight:bold;color:#000000"><? echo $myrowe[Person_Title_3];?></font>
<? } 
if($myrowe[Address_row1]!='') {?>
<br />
<font style="font-family: Arial; font-size: 8.5pt; color:#000000"><? echo $myrowe[Address_row1];?></font>
<? } 
if($myrowe[Address_row_2]!='') {?>
<br />
<font style="font-family: Arial; font-size: 8.5pt; color:#000000"><? echo $myrowe[Address_row_2];?></font>
<? } 
if($myrowe[Address_row_3]!='') {?>
<br />
<font style="font-family: Arial; font-size: 8.5pt; color:#000000"><? echo $myrowe[Address_row_3];?></font>
<? } 
if($myrowe[Phone]!='') {?>
<br />
<font style="font-family: Arial; font-size: 8.5pt; color:#000000">Tel:<? echo $myrowe[Phone];?></font>
<? } 
if($myrowe[Fax]!='') {?>
<br />
<font style="font-family: Arial; font-size: 8.5pt; color:#000000">Fax:<? echo $myrowe[Fax];?></font>
<? } 
if($myrowe[email]!='') {?>
<br />
<a href="mailto:<? echo $myrowe[email];?>">
<font style="font-family: Arial; font-size: 8.5pt; color:#000000"><? echo $myrowe[email];?></font>
</a>
<? } 
if($myrowe[web]!='') {?>
<br />
<a href="<? echo $myrowe[web];?>"target="_blank">
<font style="font-family: Arial; font-size: 8.5pt; color:#000000"><? echo $myrowe[web];?></font>
</a>
<? } 
if($myrowe[industries_Industry_ID]!=0) {
	$queryInd = "SELECT Industry_Title FROM Industries WHERE Industry_ID=$myrowe[industries_Industry_ID]";
	$resultInd = mysql_query($queryInd) or die (mysql_error());
	$myroweIND = mysql_fetch_array($resultInd)
?>
<br />
<font style="font-family: Arial; font-size: 8.5pt; color:#000000"><? echo $myroweIND[industry_Title];?></font>
<? } 
if($myrowe[Description]!='') {?>
<br />
<font style="font-family: Arial; font-size: 8.5pt; color:#000000"><? echo $myrowe[Description];?></font><p></p>
<? } ?>
<br /><br />
<? } 
<? }} ?>



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...