nurvirus
07-10-2007, 07:40 AM
http://i12.photobucket.com/albums/a208/n_amalyna/memo_content.jpg
this is the table of memo content.. it display the data. this table works well.. and this is the coding for memo_content..
<?php
$id = $_GET['id'];
$query="SELECT DISTINCT memo_title, memo_date, memo_message, memo_code,memo_sender FROM memo where memo_code=$id";
$result=mysql_query($query) or die ('Error in query: $query. ' . mysql_error());
$rows=mysql_fetch_array($result);
{
?>
<tr>
<td width="16%"><div align="right"><strong>Date</strong></div></td>
<td width="84%"><?php echo $rows[1]; ?> <input name="memo_date" type="hidden" id="memo_date" value="<?php echo $rows[1]; ?>">
</td>
</tr>
<tr>
<td><div align="right"><strong>Title</strong></div></td>
<td><?php echo $rows[0]; ?> <input name="memo_title" type="hidden" id="memo_title" value="<?php echo $rows[0]; ?>"></td>
</tr>
<tr>
<td><div align="right"><strong>Message</strong></div></td>
<td><textarea name="textarea" readonly="true" cols="50" rows="14"><?php echo $rows[2]; ?></textarea>
<input name="message" type="hidden" id="message" value="<?php echo $rows[2]; ?>"></td>
</tr>
<?php
}
mysql_close;
?>
<tr>
<td colspan="2"><input name="Button" style="font-size: 12px;" type="submit" value="Reply"> </a>
<input name="Button" type="button" onClick="Cancel()" style="font-size: 12px;" value="Cancel"></td>
</tr>
and this is the not working tablee.. the data did not displayed. the error said the query is wrong.. but then the query is the same page as the memo_content... Can someone help me. Thank you.
http://i12.photobucket.com/albums/a208/n_amalyna/memo_reply.jpg
<?php
$id = $_GET['id'];
$query="SELECT DISTINCT memo_title, memo_date, memo_message, memo_sender, memo_code FROM memo where memo_date='$memo_date' and memo_code='$id'"; //where memo_code=$id";
$result=mysql_query($query) or die ('Error in query: $query. ' . mysql_error());
$rows=mysql_fetch_array($result);
{
?>
<tr>
<td width="22%"><div align="right"><strong>Date</strong></div></td>
<td width="78%">
<script language="JavaScript">
<!--
sampleDate1=new Date()
document.write (""+ mdy(sampleDate1))
//-->
</script>
<input name="memo_date" type="hidden" readonly="true" id="memo_date" value="<?php //echo $rows[1]; ?>"></td>
</tr>
<tr>
<td><div align="right"><strong>Title</strong></div></td>
<td><?php echo $rows[0]; ?> <input name="memo_title" readonly="true" type="hidden" id="memo_title" value="<?php echo $rows[0]; ?>"></td>
</tr>
<tr>
<td><div align="right"><strong>Message </strong></div></td>
<td><textarea name="memo_message" readonly="true" id="memo_message" cols="50" rows="5"><?php //echo $rows[2]; ?></textarea>
<input name="memo_message" type="hidden" id="memo_message" value="<?php echo $rows[2]; ?>"></td>
</tr>
<tr>
<td><div align="right"><strong>Message Reply </strong></div></td>
<td><textarea name="memo_message" id="memo_message" cols="50" rows="5"><?php //echo $rows[2]; ?></textarea>
<input name="memo_message" type="hidden" id="memo_message" value="<?php echo $rows[2]; ?>"></td>
</tr>
<?php
}
mysql_close;
?>
this is the table of memo content.. it display the data. this table works well.. and this is the coding for memo_content..
<?php
$id = $_GET['id'];
$query="SELECT DISTINCT memo_title, memo_date, memo_message, memo_code,memo_sender FROM memo where memo_code=$id";
$result=mysql_query($query) or die ('Error in query: $query. ' . mysql_error());
$rows=mysql_fetch_array($result);
{
?>
<tr>
<td width="16%"><div align="right"><strong>Date</strong></div></td>
<td width="84%"><?php echo $rows[1]; ?> <input name="memo_date" type="hidden" id="memo_date" value="<?php echo $rows[1]; ?>">
</td>
</tr>
<tr>
<td><div align="right"><strong>Title</strong></div></td>
<td><?php echo $rows[0]; ?> <input name="memo_title" type="hidden" id="memo_title" value="<?php echo $rows[0]; ?>"></td>
</tr>
<tr>
<td><div align="right"><strong>Message</strong></div></td>
<td><textarea name="textarea" readonly="true" cols="50" rows="14"><?php echo $rows[2]; ?></textarea>
<input name="message" type="hidden" id="message" value="<?php echo $rows[2]; ?>"></td>
</tr>
<?php
}
mysql_close;
?>
<tr>
<td colspan="2"><input name="Button" style="font-size: 12px;" type="submit" value="Reply"> </a>
<input name="Button" type="button" onClick="Cancel()" style="font-size: 12px;" value="Cancel"></td>
</tr>
and this is the not working tablee.. the data did not displayed. the error said the query is wrong.. but then the query is the same page as the memo_content... Can someone help me. Thank you.
http://i12.photobucket.com/albums/a208/n_amalyna/memo_reply.jpg
<?php
$id = $_GET['id'];
$query="SELECT DISTINCT memo_title, memo_date, memo_message, memo_sender, memo_code FROM memo where memo_date='$memo_date' and memo_code='$id'"; //where memo_code=$id";
$result=mysql_query($query) or die ('Error in query: $query. ' . mysql_error());
$rows=mysql_fetch_array($result);
{
?>
<tr>
<td width="22%"><div align="right"><strong>Date</strong></div></td>
<td width="78%">
<script language="JavaScript">
<!--
sampleDate1=new Date()
document.write (""+ mdy(sampleDate1))
//-->
</script>
<input name="memo_date" type="hidden" readonly="true" id="memo_date" value="<?php //echo $rows[1]; ?>"></td>
</tr>
<tr>
<td><div align="right"><strong>Title</strong></div></td>
<td><?php echo $rows[0]; ?> <input name="memo_title" readonly="true" type="hidden" id="memo_title" value="<?php echo $rows[0]; ?>"></td>
</tr>
<tr>
<td><div align="right"><strong>Message </strong></div></td>
<td><textarea name="memo_message" readonly="true" id="memo_message" cols="50" rows="5"><?php //echo $rows[2]; ?></textarea>
<input name="memo_message" type="hidden" id="memo_message" value="<?php echo $rows[2]; ?>"></td>
</tr>
<tr>
<td><div align="right"><strong>Message Reply </strong></div></td>
<td><textarea name="memo_message" id="memo_message" cols="50" rows="5"><?php //echo $rows[2]; ?></textarea>
<input name="memo_message" type="hidden" id="memo_message" value="<?php echo $rows[2]; ?>"></td>
</tr>
<?php
}
mysql_close;
?>