Spam mail and forms

  steven_frost 12:09 03 Jul 2006

Hi all,
Just of late i've been getting 25+ emails a day about products which i dont want, what i would like to know how can i stop this on a form page cheers

  ade.h 15:50 03 Jul 2006

click here

Add that to your PHP code to prevent the use of your form for spam. I would imagine that there are a lot of other people getting the same e-mails and thinking that you sent them.

You'd be wise to use a unique name for your PHP file, or add:

if (!isset($_REQUEST['email'])) {
header( "Location: http: //www. example .com/feedback.html" );

This will prevent guesswork being used to find your PHP code and see your e-mail address.

  steven_frost 23:05 03 Jul 2006

Sorry for sounding stupid but i use frontpage to creat the froms do i just add this in to the html

  ade.h 23:21 03 Jul 2006

No, you add the code to your PHP. Think of the HTML form and its PHP script as entirely seperate.

I still have an example PHP file - without the anti-spam code, though - on my freespace if it's relevant to you. click here

  ade.h 23:21 03 Jul 2006

Wrong filename click here

  steven_frost 12:26 04 Jul 2006

Sorry for sounding stupid but how do i go about this i've never ever used PHP so need help

  ade.h 12:48 04 Jul 2006

I was new to it once, too. Not that complex once it's all explained to you.

I can't advice you about FP'03 from a wizzywig perspective, because I use NOF, which has a properties pallette for every object; you just click on your submit button and add the name of your PHP file into the Action box. I then prefer to upload it manually (FTP) to make sure that it goes to the right place. It needs to be in the same folder as its partner HTML file.

For you to set the action, it might be best to do it in the HTML if you can. <form name="LAYOUTFORM" action="myphpfile.php" METHOD=POST>. Just look for <form name and add the action after it.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

WPA2 hack: How secure is your Wi-Fi?

HP’s new Surface Pro rival is designed specifically for Adobe-using designers and artists

Best kids apps for iPhone & iPad

Que faire si son iPhone ou iPad est tombé dans de l'eau ?