-4

I'm a PHP beginner and I have a problem: when I use this:

if(isset($_POST['doc_lang'], $_POST['doc_title'], $_POST['doc_header'], $_POST['doc_body'], $_POST['doc_footer']) AND !empty($_POST['doc_lang'], $_POST['doc_title'], $_POST['doc_header'], $_POST['doc_body'], $_POST['doc_footer']))

I have this error: Parse error: syntax error, unexpected ',' in (...)/WebDoc.php on line 3.

What is the correct syntax? Thank

Dummy
  • 1
  • 3

2 Answers2

0

You need a proper logical operator so depending what you are trying to do, it could for example be || or &&

mayersdesign
  • 5,062
  • 4
  • 35
  • 47
0

To the best of my knowledge, empty() cannot accept multiple variables the way that isset() does.

P. Gearman
  • 1,138
  • 11
  • 14