i'm just having a prblem with displaying records from db in the same page. i'm just trying to write a php code but it didn't show up. Th records are documnted in db by thier first name, middlename & party.
html:
<[B]select name="zone" size="1" id="zone"[/B]>
<option selected="selected" value="Addis Zone1">Addis Zone1</option>
<option value="Addis Zone2>Addis Zone2</option>
<option value="Addis Zone3>Addis Zone3</option>
<option value="Addis Zone4>Addis Zone4</option>
<option value="Addis Zone5>Addis Zone5</option>
</select>
</label>
</span></p>
<div align="center">
<input name="first" type="radio" checked value="first" />
<span class="style12">First Name</span>
[B]<input type="text" name="firstname" size="20" />[/B]
<span class="style12">Second Name</span>
[B] <input type="text" name="secondname" size="20" />[/B]
<span class="style2">Party Status
[B] <input type="text" name="party" size="20" />[/B]
</span>
</div>
if it's like this i wrote the php code also but it didn't work for me.
<?php
if ($zone == "zone")
{
$result=mysql_query("select zone,firstname,middlename,party from candidate where $zone='$_POST[zone]'") or
die (mysql_error());
while ($row=mysql_fetch_array($result))
{
echo '$firstname='$row[firstname]';
echo '$firstname='$row[firstname]';
echo '$party='$row[party]';
}
else
exit;
}
plzz check it out..