the data can't display in the form....

Posted by shimaTun on Stack Overflow See other posts from Stack Overflow or by shimaTun
Published on 2010-03-21T18:49:49Z Indexed on 2010/03/21 18:51 UTC
Read the original article Hit count: 632

Filed under:
|

i wrote code to view data after user fill the form...but the data can't display....

this the code :

<?php
include "connectioncomplaint.php";

$userid  = $_GET['userid'];
$secname = $_GET['secname'];
$subject = $_GET['subject'];
$comment = $_GET['comment'];


//Tarik data dari sini 
$queryDetail = " SELECT * FROM campuscomplaint " . 
               " WHERE userid = '". $userid . "' AND secname = '". secname . "' ";


$resultDetail = mysql_query($queryDetail);
$detail = mysql_fetch_array($resultDetail);



?>

and this code for form:

<tr>
    <td height="400" colspan="7" bgcolor="#FFFFFF">

    <table width="67%" align="center" border="1" bordercolor="#ABD519" cellpadding="2" cellspacing="2">
    <tr bordercolor="#0000FF" bgcolor="#000033"> 
        <td colspan="2" align="center" valign="top" bgcolor="#ABD519"> --- Complaint Detail --- &nbsp;</td>
    </tr>
        <tr bordercolor="#FFFFFF">
        <td width="40%" class="register">User ID:</td>
        <td width="62%" class="register"><?php echo $detail['userid']; ?></td></tr>

        <tr bordercolor="#FFFFFF">
        <td width="40%" class="register">Section Name:</td>
        <td width="62%" class="register"><?php echo $detail['secname']; ?></td></tr>

<tr>
        <td width="40%" bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="register">Subject:</td>
        <td width="62%" bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="register"><?php echo $detail['subject']; ?></td></tr>

        <tr>
        <td width="40%" bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="register">Comment:</td>
        <td width="62%" bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="register"><?php echo $detail['comment']; ?></td></tr>



    <tr bordercolor="#0000FF" bgcolor="#ABD519"> 
        <td colspan="2" align="center" valign="top">&nbsp;</td>
    </tr>
</table> 

how to view data from dbase?.... help me...

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql