I wrote a JavaScript script that swaps two selected img tag src values.
The point is to let the user rearrange a list of images.
For sending the new order to a PHP script, I have two ideas:
Have a button execute a JavaScript function that gathers the new order of images into an array of URLs. Then, rely on JavaScript to send the data to a PHP script?
Have the initial JavaScript rearrange
hiddeninput tagvalueattributes which would contain data such as a URL and order number. Then, rely on asubmitinput button to execute aPOSTrequest without JavaScript?
Thanks!