encode data in get request
- by user902395
<!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<body onload="searchForPrograms.submit();">
<form id="searchForPrograms" name="searchForPrograms" enctype="application/x-www-form-urlencoded" method="get" action="searchingEngine.php">
<input type="text" id="query" name="query" value="MyProgram" /><br>
<input type="submit" value="Search" />
</form>
</body>
The get request should have the form like "searchingEngine.php?query=%22MyProgram%22".
How can I encode the value of the query input correctly?