Jeg har flg. kode:
<pre>
<?
mysql_connect("localhost","$usercon","$userconpas");
mysql_select_db("test");
if($sendz == "OK")
{
if($chkuz="#AutoPilot")
{
$query = mysql_query("select * from PCA where word2PCA like '%$mes'");
$number = mysql_num_rows($query);
echo ("Din søgning på: $mes gav $number resultat(er):<p>");
echo (mysql_error());
if ($number==0)
{
$mesg="I cant understand you please try again on the folowing language(s): English";
$Sesg=time();
$Userg="#AutoPilot";
$Pasg="#NON-*";
$Titleg="AutoPilot";
mysql_query("INSERT INTO chkcha (Msg,Ses,User,Pas,Title) VALUES ($mesg,$Sesg,$Userg,$Pasg,$Titleg)");
$query = mysql_query("select id,Msg,Ses,User,Title from chkcha order by Ses DESC LIMIT 0,8888");
$number = mysql_num_rows($query);
while($data = mysql_fetch_array($query)){
$Sa=$Sa & $data[$msg] & "\\n";
echo("<textarea cols='50' rows='20' name='mes' wrap='physical'>$Sa</textarea>");
}
}
else
{
while ($r = mysql_fetch_array($query))
{
extract($r);
$mesg=$PCA2Uz;
$Sesg=time();
$Userg="#AutoPilot";
$Pasg="#NON-*";
$Titleg="AutoPilot";
mysql_query("insert into chkcha (Msg,Ses,User,Pas,Title) values ('$mesg','$Sesg','$Userg','$Pasg','$Titleg')");
$query = mysql_query("select * from chkcha order by Ses DESC LIMIT 0,8888");
$number = mysql_num_rows($query);
while($data = mysql_fetch_array($query)){
$Sa=$Sa & $data[$msg] & "\\n";
echo("<textarea cols='50' rows='20' name='mes' wrap='physical'>$Sa</textarea>");
}
}
}
}
else
{
$mesg=$mes;
$Sesg=time();
$Userg=$Userh;
$Pasg=$UpasH;
$Titleg=$UtileH;
mysql_query("insert into chkcha (Msg,Ses,User,Pas,Title) values ('$mesg','$Sesg','$Userg','$Pasg','$Titleg')");
$query = mysql_query("select * from chkcha order by Ses DESC LIMIT 0,8888");
$number = mysql_num_rows($query);
while($data = mysql_fetch_array($foresp)){
$Sa=$Sa & $data[$msg] & "\\n";
echo("<textarea cols='50' rows='20' name='mes' wrap='physical'>$Sa</textarea>");
}
}
}
else
{
$query = mysql_query("select id,Msg,Ses,User,Title from chkcha order by Ses DESC LIMIT 0,8888");
$number = mysql_num_rows($query);
while($data = mysql_fetch_array($query)){
$Sa=$Sa & $data[$Msg] & "\\n";
echo("<textarea cols='50' rows='20' name='mes' wrap='physical'>$Sa</textarea>");
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Nyt dokument</title>
<meta name="generator" content="TSW WebCoder">
</head>
<body>
<form name="PolComChat" method="POST" action="chk.php">
<input type="hidden" name="sendz" value="OK">
<input type="text" name="mes" size="50"><input type="submit" name="send" value="Send">
<select name="chkuz" class="input"><p></p>
<?
mysql_connect("localhost","$usercon","$userconpas");
mysql_select_db("test");
$qry = mysql_query("select * from chkusers");
while ($row = mysql_fetch_array($qry)){
echo (mysql_error());
$id = $row["id"];
$chkus = $row["chkUserName"];
echo ("<option value=\\"$id\\">$chkus</option>");
echo (mysql_error());
}
?>
</select>
</form>
</body>
</html>
</pre>
hvorfor ville dette ikke virke.
det ville ikke tilføje det er er skrevet til databsen og den ville hllerik tag det der er i databsen ud!
msg består er af typen tekst og fuldtekst
den udskriver bare 0 også elv om der er en medelse i databsen!
hvorfor?
håber nogen kan hjælpe!
TAK!
mvh.
Thomas Christensen
;-)
ingen svar tage selv pointne