A few comments here...
Firstly, please encapse keys for an associative array with quotes, they are strings like any other string:
$info[resident]
...will throw an E_NOTICE error because PHP first looks for a constant called resident, which it will not find, then assume the value of 'resident'. Use
$info['resident']
instead.
Secondly, it would appear the section at the top of the script is assigning a lot of variables based on the $_POST parameters, but only one of them is ever used. You can use the import_request_variables() function to do this in one operation, but I suspect this is unnecessary in this case, since you do not appear to be using them.
Thirdly, you appear to be using the user 'root' to connect to your database. This is very bad practice, you should create another user that only has the necessary permissions for accessing the specific database you are dealing with.
Fourthly, you can SELECT data from multiple tables with the following syntax:
SELECT `table_1`.*, `table_2`.* FROM `db_name`.`table_1`,`db_name`.`table_2` WHERE 'condition1' = 'value1'
I would imagine you are going for something like this:
<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
// MySQL connection details
$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());
$query = "SELECT `profile`.*, `jpg`.`imgdata`
FROM `child`.`profile`, `child`.`jpg`
WHERE `profile`.`cnam` = '".$_POST['cnam']."'
AND `profile`.`cnam` = `jpg`.`cnam`";
// Get all the data from the "profile" table
$select=mysql_query($query);
echo " <P ALIGN='CENTER'><b>".$_POST['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>
<tr><td>JPG</td><td>
<img src="'.$info['imgdata'].'" alt="My Alt Text" />
</td></tr>
</form>
</table>';
}
?>
</legend>
</body></html>