Table profile has column names; cnumb, cnam, cage, csex
Table jpg has column names; pid, cnam, imgdata.
I can display details from each table seperately but now i want to be able to display the image along with its details from another table.
Thank you.
File to display the profile details.
childfind.php
<html>
<body bgcolor=#afd1f4>
<legend>
<!-- <img src="umulogo.gif"><img src="index_header.gif"> -->
<table border='1' bgcolor=#7991d4 frame=lhs cellpadding="4" width=100%>
<tr bgcolor=#cbe0ac ><td><font face='Vinque'><B>SEARCH FOR A CHILD </B></TR>
<tr><td><p align="center"><font size="4" face="Vinque">
<form action="childfind.php" method="POST">
<p align="center"><font size="4" face="">
CHILD NAME:<br/>
<input type="text" name="cnam" size="30" /><br/>
<div align="center"><input type="submit" name="submit" value= "Find" />
<input type="reset" name="Clear" value= "Clear" />
</div>
</form>
<form action="child.html" method="POST">
<div align="left"><input type="submit" name="submit" value=" Back" />
<div ALIGN="CENTER">
<blockquote>
<p title="INSERT CHILD DETAILS" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22" accesskey="1">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22" accesskey="1" title="INSERT CHILD DETAILS">
<param name="movie" value="CHILD.swf" />
<param name="quality" value="high" />
<embed src="CHILD.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="22" ></embed>
</object>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22" accesskey="2" title="UPDATE CHILD DETAILS">
<param name="movie" value="CHILD1.swf" />
<param name="quality" value="high" />
<embed src="CHILD1.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="22" ></embed>
</object>
<legend>
<table border='1' bgcolor=d4ecfb frame=lhs cellpadding="4" width=100%>
</p>
</blockquote>
<tr><td>
<title>Search Results</title></head><h4><p align="center"><font size="5"></font></h4></p>
<br/>
<?php
$cnumb=$_POST['cnumb'];
$cnam=$_POST['cnam'];
$ctribe=$_POST['ctribe'];
$cage=$_POST['cage'];
$cage=$_POST['cweight'];
$csex=$_POST['csex'];
$cclass=$_POST['cclass'];
$resident=$_POST['resident'];
$pnam=$_POST['pnam'];
$ploc=$_POST['ploc'];
$cpnumb=$_POST['cpnumb'];
$foccupation=$_POST['foccupation'];
$mnam=$_POST['mnam'];
$mloc=$_POST['mloc'];
$mpnumb=$_POST['mpnumb'];
$moccupation=$_POST['moccupation'];
$cloc=$_POST['cloc'];
$category=$_POST['category'];
$cnationality=$_POST['cnationality'];
$crelatives=$_POST['crelatives'];
$brosis=$_POST['brosis'];
$cdisabilty=$_POST['cdisabilty'];
$ccarrier=$_POST['ccarrier'];
$creligion=$_POST['creligion'];
$parostatus=$_POST['parostatus'];
$cdatedel=$_POST['cdatedel'];
$server = 'localhost';
$dbuser="root";
$dbpasswd="";
// Make a MySQL Connection
mysql_connect($server , $dbuser , $dbpasswd) or die(mysql_error());
mysql_select_db("child") or die(mysql_error());
// Get all the data from the "profile" table
$select=mysql_query("select * from `profile` where cnam='$cnam'");
//$result=mysql_query($select);
echo " <P ALIGN='CENTER'><b>$cnam'S DETAILS FROM M-LISADA DATABASE ";
while($info=mysql_fetch_array($select)){
echo '
<table align="center" border="0" cellspacing="0" cellpadding="0" bgcolor=c6c7c9 style="border-style:dashed; border-width:1px; border-color:#6b5d3f;" >
<form method=post action=childupdate1.php>
<tr><td>CHILD NUMBER</td><td>
<input name="cnumb" class="textfield" value="'.$info[cnumb].'">
</td></tr>
<tr><td>CHILD NAME</td><td>
<input name="cnam" class="textfield" value="'.$info[cnam].'" size=30 class="textfield">
</td></tr>
<tr><td>CHILD TRIBE</td><td>
<input name="ctribe" class="textfield" value="'.$info[ctribe].'" size=30 class="textfield">
</td></tr>
<tr><td>CHILD AGE</td><td>
<input type=text name=cage value="'.$info[cage].'" size=30 class="textfield"></td></tr>
<tr><td>CHILD WEIGHT</td><td>
<input type=text name=cweight value="'.$info[cweight].'" size=30 class="textfield"></td></tr>
<tr><td>CHILD SEX</td><td>
<input type=text name=csex value="'.$info[csex].'" size=30 class="textfield"></td></tr>
<tr><td>CLASS</td><td>
<input type=text name="cclass" class="textfield" value="'.$info[cclass].'">
</td></tr>
<tr><td>RESIDENT</td><td>
<input type=text name="resident" class="textfield" value="'.$info[resident].'">
</td></tr>
<tr><td>FATHERS NAME </td><td>
<input type=text name="pnam" class="textfield" value="'.$info[pnam].'" size=30 class="textfield">
</td></tr>
<tr><td>FATHERS PHONE NUMBER</td><td>
<input type=text name=cpnumb value="'.$info[cpnumb].'" </td></tr>
<tr><td>FATHERS OCCUPATION</td><td>
<input type=text name=foccupation value="'.$info[foccupation].'" size=30 class="textfield"></td></tr>
<tr><td>FATHERS LOCATION</td><td>
<input type=text name="ploc" class="textfield" value="'.$info[ploc].'">
</td></tr>
<tr><td>MOTHERS NAME</td><td>
<input type=text name=mnam value="'.$info[mnam].'" size=30 class="textfield"></td></tr>
<tr><td>MOTHERS LOCATION</td><td>
<input type=text name=mloc value="'.$info[mloc].'" size=30 class="textfield"></td></tr>
<tr><td>MOTHERS PHONE NUMBER</td><td>
<input type=text name=mpnumb value="'.$info[mpnumb].'" size=30 class="textfield"></td></tr>
<tr><td>MOTHERS OCCUPATION</td><td>
<input type=text name=moccupation value="'.$info[moccupation].'" size=30 class="textfield"></td></tr>
<tr><td>WHERE M-LISADA FOUND YOU</td><td>
<input type=text name=cloc value="'.$info[cloc].'" class="textfield">
</td></tr>
<tr><td>CATEGORY</td><td>
<input type=text name="category" class="textfield" value="'.$info[category].'">
</td></tr>
<tr><td>NATIONALITY</td><td>
<input type=text name="cnationality" class="textfield" value="'.$info[cnationality].'">
</td></tr>
<tr><td>NAMES OF BROTHERS/SISTERS</td><td>
<input type=text name="brosis" class="textfield" value="'.$info[brosis].'" size=60 >
</td></tr>
<tr><td>RELATIVES</td><td>
<input type=text name="crelatives" class="textfield" value="'.$info[crelatives].'" size=60 >
</td></tr>
<tr><td>DISABILITY</td><td>
<input type=text name="cdisabilty" class="textfield" value="'.$info[cdisabilty].'">
</td></tr>
<tr><td>FUTURE CARRIER</td><td>
<input type=text name="ccarrier" class="textfield" value="'.$info[ccarrier].'">
</td></tr>
<tr><td>RELIGION</td><td>
<input type=text name="creligion" class="textfield" value="'.$info[creligion].'">
</td></tr>
<tr><td>PARENT LIVING</td><td>
<input type=text name="parostatus" class="textfield" value="'.$info[parostatus].'">
</td></tr>
<tr><td>ARRIVAL DATE</td><td>
<input type=text name="cdatedel" class="textfield" value="'.$info[cdatedel].'">
</td></tr>
</form>
</table>';
}
?>
</legend>
</body></html>


Sign In
Create Account

Back to top









