Results 1 to 3 of 3

Thread: edit page

  1. #1
    Join Date
    Mar 2007
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default edit page

    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

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Could you post the code you already have so that we have something to work with.
    Thanks.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Mar 2007
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    <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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •