encode data in get request

Posted by user902395 on Stack Overflow See other posts from Stack Overflow or by user902395
Published on 2012-10-30T16:59:04Z Indexed on 2012/10/30 16:59 UTC
Read the original article Hit count: 142

Filed under:
|
|
|
<!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?

© Stack Overflow or respective owner

Related posts about html

Related posts about forms