Share via

Condition Check

Peter Volz 1,295 Reputation points
2023-08-21T09:29:44.24+00:00

I'm just learning PHP, compared to VB.NET, it's a disaster to me :( Anyway, is this conditional check correct?

if (($_SERVER['HTTP_REFERER'] == 'ht.../index.html') || ($_SERVER['HTTP_REFERER'] == 'ht.../index.html')) && ($_POST[Topic] != -1) && ($_POST[Product] != -1) @mail(...

I mean if referer is any of the 2 URLs AND ALSO $_POST[Topic] <> -1 AND ALSO $_POST[Product] <> -1 then mail...

For some reason it won't work :( Thanks for help.

Community Center | Not monitored

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.