hola caricatos! gracias por responderme! ese código que coloqué fue el que encontré en internet, yo lo adapto a mi form, aqui te coloco el form donde lo voy a colocar, para que veas el action
estuve leyendo otros temas sobre captcha aqui en el foro y vi que otro usuario tiene el mismo problema y lo que hicieron fue mandarlo a ver unos links pero el code es el mismo, y veo que otros usuarios con experiencia en programación también estan bien confundidos. tan dificil es hacer esto para ponerle seguridad a un formulario? que otra cosa puedo usar que no sea un captcha ya que veo que esto no lo voy a poder hacer, espero tu consejo. gracias de antemano
<?php
$datafile = "msgs.data";
if(isset($_POST[content])) {
extract($_POST);
$oldarray = fopen("$datafile", "r");
$oldcontents = fread($oldarray, filesize($datafile)) or die( 'Could not read from file.');
fclose($oldarray);
if(!$fp = fopen("$datafile", "w")){
die("Error: PHP does not appear to have permission to write to $datafile");
}
fwrite ($fp, "<b>Enviado por:</b> $name - ");
fwrite ($fp, date("d/n/y [h:i:s A]"));
fwrite ($fp, "<br><b>Email:</b> <font color='#FFFFFF'><a href='mailto:$email'>$email</a></font><br>");
fwrite ($fp, "<b>Título:</b> $title<br><b>Mensaje:</b><br>");
fwrite ($fp, stripslashes($content) . "<br><hr noshade size=1><br>");
fwrite ($fp, $oldcontents);
fclose($fp);
header("Location: $_SERVER[PHP_SELF]");
}
?>
<form method="post" action="<? echo $_SERVER[PHP_SELF]; ?>">
</font>
<span class="Estilo4">
<b><font style='font-family:Verdana' color="#FFCC00">Escribe tu mensaje<font><font size=2 style='font-family:Verdana'><br>
<br>
Nombre:</font></b><font color="#FFCC00" size="2" style="font-family: Verdana">*</font><font style='font-family:Verdana; font-size:8pt'>
</font><font size=2 style='font-family:Verdana'> <input type="text" name="name" style="font-family: Verdana; font-size: 10pt; color: #800000; border: 1px solid #800000" size="20"><br>
</font>
</span>
<span class="Estilo4">
<font style='font-family:Verdana; font-size:2pt'><br>
</font><font size=2 style='font-family:Verdana'><b>Email:</b>
<input type="text" name="email" size="20" style="font-family: Verdana; font-size: 10pt; color: #800000; border: 1px solid #800000"><br>
</font><font style='font-family:Verdana; font-size:2pt'>
<br>
</font><font size=2 style='font-family:Verdana'><b>Título:</b>
<input type="text" name="title" style="font-family: Verdana; font-size: 10pt; color: #800000; border: 1px solid #800000" size="20">
<br>
</font><font style='font-family:Verdana; font-size:2pt'><br>
</font><font size=2 style='font-family:Verdana'><b>Mensaje:</b><font color="#FFCC00">*</font>
<textarea name=content rows=6 cols=47 wrap=soft style="font-family: Verdana; font-size: 10pt; color: #800000; border: 1px solid #800000"></textarea><br>
</font><font style='font-family:Verdana; font-size:2pt'><br>
</font><font style='font-family:Verdana; font-size:7pt'[</font><font color="#FFCC00" size="2" style="font-family: Verdana">*</font><font style='font-family:Verdana; font-size:7pt'>Campos
obligatorios] </font><font size=2 style='font-family:Verdana'>
<input type="submit" name="submitButton" value="Publicar" style="font-family: Verdana; color: #FFFFFF; font-size: 8pt; border: 1px solid #FFFFFF; background-color: #CC0000">
</span>