Hello all, i have this matching story. What i want to do, is to check the
variable $betaling if this is 0 or 1. But the id from the tabel form have to
be compared with $persid from the table reactie. thats not the problem, the
problem is i am not able to make 2 queries in one while statement, does
anyone knows how to solve this?
Irlan
$query = "SELECT a.oproep,b.oproep, a.react, b.react, a.logid, b.logid,
a.persid,b.persid, a.logemail, b.logemail,a.persemail,b.persemail
FROM reactie a, reactie b
WHERE a.logid = b.persid AND b.logid = a.persid AND a.logid='$logid' ";
$result = mysql_query($query);
$query_data = mysql_fetch_row($result);//
if($result = mysql_query($query)){
$rows = mysql_num_rows($result);
if($rows<1){
echo "<p>You have no Matches";
} else {
echo "<p>You have $rows Match(es)<p><p>";
}}
while($query_data = mysql_fetch_array($result)){
$oproep = $query_data["oproep"];
$persid = $query_data["logid"];
$reactie = $query_data["react"];
$logemail = $query_data["logemail"];
$sql= "SELECT betaling from form where id='$persid'";
$res = mysql_query($sql);
$query_data = mysql_fetch_row($res);
while($query_data = mysql_fetch_array($result)){
$betaling= $query_data["betaling"]
}
if ($betaling="0"){
echo "your contact did not pay for this service yet, he will be notified,
you dont have to pay for this service";
} else {
echo " <tr>\n";
echo " <td align=center bgcolor=FFECC4 ><font
color=black><a
href=\"javascript:Pop550Picture('../pic/klanten/gegevens.php?id=$persid')\"><p>$oproep</a></td>\n";//
echo " <td align=center bgcolor=FFECC4 ><font
color=black><p>".$reactie."</td>\n";
echo " <td align=center bgcolor=FFECC4 ><font
color=black><p>".$reactie."</td>\n";
echo " <td align=center bgcolor=FFECC4 ><font
color=black><p><a href=\"mailto:".$logemail."\">".$logemail."</a></td>\n";
echo " </tr>\n";//
}}