Help with PHP syntax 2

I have a form that captures a username and email address.

I want to add a very basic spam filter into my php form processor script along the lines of "if username = "test" then set email = "SPAM".

Here is my code that's not working:

$_SESSION['formfield1'] = $_REQUEST['formfield1'];

$_SESSION['formfield2'] = $_REQUEST['formfield2'];

If ($_REQUEST['formfield2'] = "test") {$_SESSION['formfield1'] = 'SPAM';}

The error with this statement is that $_SESSION['formfield1'] always takes the value of 'SPAM' even when formfield2 = "Michael".

The freelancer should be able to work with me using the chat window so that I can instantly test the suggested solution.

Compétences : PHP, Architecture Logicielle

en voir plus : spam filter php, form spam filter php, software write mq4, software write chip epson, useful software write book, software write web specs, free software write user guide, software write edid, free software write company profile, software write websites idea, software write book images, software write books, software write protection, free software write book, software write book, easy php help, php extract href value, php help error imagecreatetruecolor invalid image dimensions, ajax php help, paypal web payment pro php help, volusion customization php help, vldpersonals php help, crafty syntax live help status online offline, regapi php help, software write protect software

Concernant l'employeur :
( 142 commentaires ) Los Angeles, United States

Nº du projet : #12631584

Décerné à:

$2 USD / heure
(2 Commentaires)

6 freelance font une offre moyenne de $6/heure pour ce travail

$7 USD / heure
(400 Commentaires)

Hello there! There's no need to pay me for this advice. You have a simple bug: If ($_REQUEST['formfield2'] = "test") {$_SESSION['formfield1'] = 'SPAM';} Should be: If ($_REQUEST['formfield2'] == "test") {$_ Plus

$5 USD / heure
(14 Commentaires)

Hi,I'm very very interested in your job. I have enough experience for this job. I wanna work for u. If u award me, i can finish this job without fail. Please send me message. Thanks...

$8 USD / heure
(5 Commentaires)

Hello Sir, I am an experienced professional web master, working with Shopify, big commerce and Word press, joomla for over 8 years now. I have knowledge of HTML, CSS, jQuery, AJAX, PHP etc. Based on my expertise an Plus

$5 USD / heure
(4 Commentaires)

Dear Sir, i want to work with you. Super confident to deliver you utmost quality. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Thank you for Reviewing my Proposal, I read your description very carefully. I Plus

$5 USD / heure
(0 Commentaires)

Hi, I’m Carlos I’d like to help you completing your project, I already have a raw website ( [login to view URL] ) I’m going to build your application here and you are going to see a preview before closing the Plus

$11 USD / heure
(0 Commentaires)