I currently have a website that allows me to send values from a simple form to a machine that works with a "URL encode" format like this :
In project.html page :
<form method="post" action="go.php">
<select name="project">
<option value="My%20first%20project%20is%20%2Bgreen">1st project (green)</option>
<option value="My%20second%20project%20is%20%2Bblue">2nd project (blue)</option>
</select>
</form>
It works for my machine but I want to see and to save in an other page the result. I created this :
In go.php page :
<?php echo $_POST['project']; ?>
The problem is that the displayed result in the go.php page is raw: "My%20first%20project%20is%20%2Bgreen"
I would like one of these 2 solutions to fix this:
1 - Is it possible to interpret the URL language encoded in HTML so that each character is displayed as in UTF-8?
2 - Is it possible to add another value to each option that would be read by the $_POST ? For example :
<form method="post" action="go.php">
<select name="project">
<option value="My%20first%20project%20is%20%2Bgreen" value2="Project Green">1st project (green)</option>
<option value="My%20second%20project%20is%20%2Bblue" value2="Project blue">2nd project (blue)</option>
</select>
</form>
But how to extract the "value2" value in my PHP page ?
Thank you very much for your help !
I tried inserting the value in an iframe tag hoping the url would be read raw but it didn't work:
go.php page :
<html>
<body>
<iframe src="<?php echo $_POST['project']; ?>"></iframe>
</body>
</html>
I tried this to :
<html>
<body>
<iframe src="http://<?php echo $_POST['project']; ?>"></iframe>
</body>
</html>
But the iframe does not display the result
I read the other answers on this forum and I did not find an answer.