Jump to content

data replication


I-AM-OBODO

Recommended Posts

Hi.

i don't know my query result is replicating itself.

tried my head out, someone pls help before i go bananas

 

if(isset($_POST['Submit'])){
$search = $_POST['search'];
if($search ==''){
echo "<font size=3 color=red><b>Search field empty. <input type='button' value='Try Again' onClick='history.go(-1)'><br>";
}else{


$query = "SELECT t1.ParcelDesc, t1.DeliveryAddress, t1.New_Address, t2.status, t2.remarks FROM parcels t1 JOIN parcel_status t2 ON t1.Email=t2.username WHERE t1.ParcelDesc = '$search' AND t1.Email = '$_SESSION[username]' ";
$result = (mysql_query($query));


if(mysql_num_rows($result) < 1){
echo ("<font size=3 color=red><b>No Match Found. <input type='button' value='Try Again' onClick='history.go(-1)'>");
}else{

$num_rows = mysql_num_rows($result);
//print "There are $num_rows records.<P>";
echo "<table width= '100%' border='1' bordercolor='#000000' cellpadding='1' cellspacing='1'>
<tr >
<th>Parcel-Desc</th>

<th>Recipient Name & Address</th>

<th>New Address</th>

<th>Remarks</th>

<th>Status</th>
</tr>";
while ($get_info = mysql_fetch_row($result)){ 
print "<tr >\n";
foreach ($get_info as $field) 
print "\t<td ><font face=arial size=2/>$field</font></td>\n";
print "</tr>\n";
}
print "</table>\n";
print "<br>";
//mysql_close($link);
}


}

}

Link to comment
https://forums.phpfreaks.com/topic/202759-data-replication/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.