I-AM-OBODO Posted May 24, 2010 Share Posted May 24, 2010 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.