<form action="reply.php" method="post">
<textarea name="reply" rows=7 cols=60></textarea><br>
<input type=submit name="submit" value="ok"/>
</form><p>
<?php
include("conn.php");
$sql="update msg set msgs=concat(msgs,".$_POST[reply].") where id=$num";
$query=mysql_query($sql);
?>
i dont know how to write concat()
something wrong with $_POST[reply]
help me, plz.thank u!
problem about function concat
Moderator: General Moderators
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: problem about function concat
$_POST['reply'] not $_POST[reply]
Where is $num coming from?
Where is $num coming from?
-
powerights
- Forum Newbie
- Posts: 2
- Joined: Mon Sep 21, 2009 6:00 am
Re: problem about function concat
$num from 'admin.php' the code :
$_POST['reply'] has tried , not work ..
Code: Select all
<?php
include "conn.php";
?>
<table width=500 border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#add3ef">
<?
$sql="select *from msg order by id desc";
$query=mysql_query($sql);
while($row=mysql_fetch_array($query)){
?>
<tr bgcolor="#eff3ff">
<td><?=$row[id]?># Name:<?=$row[name]?> </td>
</tr>
<tr bgcolor="#ffffff">
<td>Tel.<?=$row[tele]?> Time:<?=$row[lastdate]?></td>
</tr>
<tr bgColor="#ffffff">
<td>Message.<?=$row[msgs]?>
<a href="del.php?num=<?=$row[id]?>">[Del.]</a>
<a href="reply.php?num=<?=$row[id]?>">[Reply]</a> </td>
</tr>
<?
}
?>
</table>