1
------WebKitFormBoundary2rntuFxldIBHkJLv
Content-Disposition: form-data; name="username"

james
------WebKitFormBoundary2rntuFxldIBHkJLv
Content-Disposition: form-data; name="email"

james@example.com
------WebKitFormBoundary2rntuFxldIBHkJLv
Content-Disposition: form-data; name="language"

en
------WebKitFormBoundary2rntuFxldIBHkJLv
Content-Disposition: form-data; name="message"

hello world

Is it possible to get the name="username" and its value "james" and so on like this in below.

username=james&email=james@example.com&language=en&message=hello world

I know I'm new to programming but I'm trying my best to produce this result but no luck so I'm trying ask here.

Majarkata
  • 37
  • 3
  • simply use `$_GET['username']` https://stackoverflow.com/questions/13447554/how-to-get-input-field-value-using-php – John Dec 12 '21 at 10:51

1 Answers1

1

You can use the PHP variables $_GET or $_REQUEST for this. Then you get a key / value array. In your case:

array:4 [▼
  "username" => "james
  "email" => "james@example.com"
  "language" => "en"
  "message" => "hello world"
]

And echo $_GET['username']; will print you: james.

Maik Lowrey
  • 15,957
  • 6
  • 40
  • 79