View Full Version : edit page
sukanya.paul
04-02-2007, 05:04 AM
hi..i need to mk a page which wil be used for editin the details tht hv been entered in the table..this page shud show all the details tht hv been entered. after makin changes by pressin edit button the table value should change. ia m havin problem in gettin the values in the text boxe for editin..
pls help
thanks in advance
thetestingsite
04-02-2007, 05:17 AM
Could you post the code you already have so that we have something to work with.
Thanks.
sukanya.paul
04-02-2007, 05:27 AM
<html>
<body bgcolor="Silver" text="Darkred" link="Cornflowerblue" vlink="Darkmagenta">
<form action="edit.php" method="post">
<table border="0" bgcolor="gainsboro" width="100%" height="800px" cellpadding="5" cellspacing="0">
<tr>
<td width="80%" >
<table border="2" width="100%" height="800px" cellspacing="0" cellpadding="5" bgcolor="CC6600">
<tr height="100px" >
<td width="100%" bgcolor="gainsboro"><!right TOP>
<br>
<FONT face="COMIC SANS" TEXT="Darkred"size="4"><center><b><u>JOB DESCRIPTION</u></b></center></font></font>
<input name="code" type="hidden" id="code" value="<? echo $_POST['jobcode'];?>"></td>
</td>
</tr>
<tr height="600px" bgcolor="gainsboro" >
<td width="100%" bgcolor="gainsboro" ALIGN="center"><!right middle >
<?php
$con = mysql_connect("localhost", "root", "intelinside");
if(!$con)
{
die("could not connect" . mysql_error());
}
mysql_select_db("recruitment", $con);
$code= $_POST['jobcode'];
$result=mysql_query("SELECT * FROM job WHERE jobcode='$code'");
/*echo "<table width='50%' border='2'>
<tr>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td width='10%'>" . "JOBCODE: " . "</td>";
target='_blank' >" );
echo "<td>" . $row['jobcode'] . "</td>";
echo "</tr>";
echo "<tr>";
echo("<td width='10%'>" ."SUBJECT: " . "</td>");
echo("<td>" .$row['subject'] . "</td>");
echo "</tr>";
echo "<tr>";
echo("<td width='10%'>" . "DESCRIPTION: " . "</td>");
echo("<td>" . $row['description'] . "</td>");
echo "</tr>";
echo "<tr>";
echo("<td width='10%'>" . "NUMBER OF OPENINGS: " . "</td>");
echo "<td>" . $row['opening'] . "</td>";
echo "</tr>";
echo "<tr>";
echo("<td width='10%'>" . "DATE OF JOB POSTED: " . "</td>");
echo "<td>" . $row['postdate'] . "</td>";
echo "</tr>";
echo "<tr>";
echo("<td width='10%'>" . "LAST DATE OF APPLICATION: " . "</td>");
echo "<td>" . $row['lastdate'] . "</td>";
echo "</tr>";
}
echo "</table>";*/
mysql_close($con);
?>
<center><table width="50%" border="1" cellspacing="2" cellpadding="5">
<tr>
<td><b>POSTING DATE :</b></td>
<td><?php echo date("d/m/Y"); ?></td>
</tr>
<tr>
<td><b>JOB CODE :</b></td>
<td><input type="TEXT" size="10" name="code" value="<? $code ? >" /></b></td>
</tr>
<tr>
<td><b>JOB SUBJECT :</b></td>
<td><input type="TEXT" size="50" name="subject" value="" /></b></td>
</tr>
<tr>
<td><b>JOB DESCRIPTION :</b></td>
<td><textarea cols="50" rows="10" name="description"></textarea></b></td>
</tr>
<tr>
<td><b>NUMBER OF OPENINGS :</b></td>
<td> <input type="TEXT" size="10" name="opening" value="" /></b></td>
</tr>
<tr>
<td><b>URL :</b></td>
<td><b> description.php </b></td>
</tr>
<tr>
<td><b>LAST DATE :</b></td>
<td> <input type="TEXT" size="10" name="lastdate" value="<? echo $lastdate; ?>" /></b></td>
</tr>
<tr>
<td></td>
<td><center><input type="submit" name="submit" value="SUBMIT"></center></td>
</tr>
</table></center>
<BR>
<BR>
<input type="submit" name="click" value="EDIT THIS JOB?">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
the commented portion is jus displayin the details but not in an editable format.
the portion below it is the format i want but its not displayin the value from the table.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.