Thank you for your help previously everyone, I was able to fix that problem.
The thing now, is that I want to add smileys to the messages; i.e. :) would
equal to a smiley image when posting a message.

$con = mysql_connect("localhost","removed","removed") or die("con");
$db = mysql_select_db("ben_test") or die("db");

$post = $_POST['comment'];

echo "<font color='red'><b>Post rejected, field left empty<br
else if(is_numeric($post)){
echo "<font color='red'><b>Post rejected, numeric data submitted<br
else if(preg_match("/www/", $post)) {
echo "<font color='red'><b>Post rejected. Advertising is prohibited!<br

else {
mysql_query("INSERT INTO `comments`(`messages`) VALUES ('$post')") or

$mysql_query_one = mysql_query("SELECT * FROM `comments`");
while($rows=mysql_fetch_array($mysql_query_one)) {
echo $rows['messages'] . "<hr>";

I have grasped quite a lot so far, and added many complementry features,
however this is only my first script - so hence it is pretty much basic as
it is!

Thanks once again, hoping someone can assist me further.

Reply via email to