-6

I have no time and too tired to struggle with this, so I decided to ask here: I've created the file my.php which contains only:

<?php var_dump( $_POST ); ?>

And then I open the file using browser like this:

www.domain.com/my.php?post1=hey&post2=ho&post3=letsgo

And in the browser I have array(0) { } as a response.

Question: What could I possibly done wrong??

Thanks!

LoomyBear
  • 449
  • 2
  • 8
  • 19

2 Answers2

2

In URL are GET parameters, not POST.

echo $_GET['post1']; // hey
echo $_GET['post2']; // ho
echo $_GET['post3']; // letsgo
pavel
  • 26,538
  • 10
  • 45
  • 61
1

You cant pass POST variables through URL. u r using GET method..

Subin S V
  • 137
  • 2
  • 12