I am relatively new to php and i have a php page on my joomla site and i would like to have the url contain a variable for example: site.com/formpage?id=3 and then i would like to post that variable using a php form so that i can use it in another php page for mysql querying alongside with the data input from the form. How would i got about doing this? thanks
Copyright © 2024 Q2A.ES - All rights reserved.
Answers & Comments
If you have a form like this:
<form method="get" action="process.php">
<input type="text" name="param1" />
<input type="submit" />
</form>
submitting that form will open the url
process.php?param1=text that was entered
In process.php, you can access the data using the $_GET array:
echo $_GET['param1'];