L
L
lue merg2018-03-07 21:33:04
JavaScript
lue merg, 2018-03-07 21:33:04

Is it possible to send parameters to the server without a form?

There are a bunch of inputs, is there a way to send their values ​​to a php file without creating the form itself, or how to submit several forms through one button on the site?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
tempick, 2018-03-07
@luemerg

You can use javascript. For example, get values ​​from inputs and create a link with GET parameters. Then, through location.href("script.php/?q1=value1&q2=value2"), transfer these values ​​to the php file. If it is necessary that the same page with inputs remains, but the data is transferred, then use AJAX

S
Stalker_RED, 2018-03-08
@Stalker_RED

FormData and ajax ( XMLHttpRequest or fetch).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question