Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4
The action attribute does not send your data to another website actually action attribute send your filled data in forms to your servers so that the server can process the user data and then give the desired result or send back information to your website by servers that what user want. Without action attribute forms are nothing. you need to use. but if you are processing user input data in JavaScript then you don't need to use action attribute because of Javascript runs on user PC not on servers.
27th Feb 2020, 2:43 AM
Maninder $ingh
Maninder $ingh - avatar
+ 2
The HTML | action Attribute is used to specify where the formdata is to be sent to the server after submission of the form. It can be used in the <form> element. The method attribute specifies how to send form-data (the form-data is sent to the page specified in the action attribute). The form-data can be sent as URL variables (with method="get") or as HTTP post transaction (with method="post"). There is more ways to send data from one website to another but need of a backend programming language Like PHP..etc In php you can use cookies and session concept to send data.. You can use anchor tag with php variable to send data Like 👇👇 echo '<a href="action.php?entry_id='.$single_id.'&user_name=' . $user_name .'">'.$user_name.'</a>';
27th Feb 2020, 2:53 AM
Scooby
Scooby - avatar