harmor19
10-26-2005, 04:22 AM
I have added three radio button on the newreply template for random replies.
What it's supposed to do is get a random reply from another table and insert it into the post along with the message they typed.
first I need to make an if else statement
if ($_POST['random_reply'] == "pos")
{
$getrr = $db->query_read("SELECT * FROM " . TABLE_PREFIX ."random_reply WHERE ptext ORDER BY RAND()'");
$rr = $db->fetch_array($getrr);
}
elseif ($_POST['random_reply'] == "neg")
{
$getrr = $db->query_read("SELECT * FROM " . TABLE_PREFIX ."random_reply WHERE ntext ORDER BY RAND()'");
$rr = $db->fetch_array($getrr);
}
What I want to do is get a random message and insert it into the "pagetext" field on the "post" table.
I can't find where it inserts the query though.
I looked in "newreply.php", "functions_newpost.php", "functions_big_three.php".
What it's supposed to do is get a random reply from another table and insert it into the post along with the message they typed.
first I need to make an if else statement
if ($_POST['random_reply'] == "pos")
{
$getrr = $db->query_read("SELECT * FROM " . TABLE_PREFIX ."random_reply WHERE ptext ORDER BY RAND()'");
$rr = $db->fetch_array($getrr);
}
elseif ($_POST['random_reply'] == "neg")
{
$getrr = $db->query_read("SELECT * FROM " . TABLE_PREFIX ."random_reply WHERE ntext ORDER BY RAND()'");
$rr = $db->fetch_array($getrr);
}
What I want to do is get a random message and insert it into the "pagetext" field on the "post" table.
I can't find where it inserts the query though.
I looked in "newreply.php", "functions_newpost.php", "functions_big_three.php".