| re: Printing AIML response in a textarea in PHP
Thanks a lot for your reply and my apologies for the delay, I couldn't log back in to the site.
Here is the code with showing the textarea.
There must be a way to tell PHP to print within the textarea declared as "Answerfield" at the bottom of the page. I am learning php at the moment and have very little experience :
[PHP]if (isset($HTTP_POST_VARS['input'])){
$numselects=0;
$myuniqueid=session_id();
$botresponse=replybotname($HTTP_POST_VARS['input'],$myuniqueid,$HTTP_POST_VARS['botname']);
print "<B>ANSWER : " . $botresponse->response . "<BR></b>"?>
<html>
<head>
<body bgcolor="lightblue" text="#000000">
<title>Feedback</title>
</head></body></html>
<form name="form1" method="post" action="talk.php">
<select name="botname">
<?
foreach ($availbots as $onebot){
print "<option value=\"$onebot\">$onebot</option>";
}
?>
</select><BR>
Type your question here: <input type="text" name="input" size="54">
<input type="submit" name="Submit" value="Submit">
</form>
<form>
Answer: <textarea name="Answerfield" cols="60"></textarea>
<input type="submit" name="GoToNextLecture" value="Next Lecture">
</form>
</body>
</html>
<?
}
?>[/PHP]
Thank you in advance, Any help is greatly appreciated
|