why the data can't dispaly in the form???
Posted
by shimaTun
on Stack Overflow
See other posts from Stack Overflow
or by shimaTun
Published on 2010-03-18T21:07:11Z
Indexed on
2010/03/18
21:31 UTC
Read the original article
Hit count: 621
I've created a code to view the data. the data can't display at the form...
the code :
<?php //======================================================================================================================= PROCESS DATA ======================================================= START.
include "connectioncomplaint.php";
?>
<?php
$subject = $_GET['type'];
$comment = $_GET['id'];
//echo 'test : ' . $name;
//Tarik data dari sini
$queryDetail = " SELECT * FROM campuscomplaint " . " WHERE subject = '" . $subject . "' AND comment = '" . $comment . "' ";
//echo 'QUERY DETAIL :' . $queryDetail . '<br>' ;
$resultDetail = mysql_query($queryDetail);
//echo 'RESULT DETAIL :' . $resultDetail + 0 . '<br>' ;
$detail = mysql_fetch_array($resultDetail);
//echo $detail . '<br>';
//echo 'detail subject is : ' . $detail['subject'] . '<br>';
//echo 'detail comment is : ' . $detail['comment'] . '<br>';
//echo $detail[$x] . '<br>';
?>
code for form:
<tr>
<td bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="register style5">From:</td>
<td bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="register style5"><input type="text" name="to"
size="40" maxlength="80" value="<?php echo $detail['userid']; ?>"/></td>
</tr>
<tr>
<td width="38%" bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="register style5">Subject:</td>
<td width="62%" bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="register style5"><input type="text" name="subject" size="40" maxlength="80" value="<?php echo $detail['subject']; ?>"/></td>
</tr>
<tr>
<td bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="register style5">Comment:</td>
<td bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="register style5"><textarea name="comment" rows="5" cols="40"><?php echo $detail['message']; ?></textarea></td>
</tr>
<tr>
<td bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="register style5"><p> </p>
<p> </p></td>
<td bordercolor="#FFFFFF" bgcolor="#FFFFFF" class="register style5"><input type="submit" name="submit" value="Submit Comment" onClick="return OnButton1();"/></td>
</tr>
© Stack Overflow or respective owner