All pastes #777594 Raw Edit

Anonym

public text v1 · immutable
·published 2007-11-16 22:16 UTC
rendered paste body
...

<form action="file.php" method="POST">
<input type="text" name="theField" value="300" />
<input type="submit" value="Submit" />
</form>

-> file.php with $_POST['theField'] = 300;


<form action="file.php" method="GET">
<input type="text" name="theField" value="300" />
<input type="submit" value="Submit" />
</form>

-> file.php with $_GET['theField'] = 300;


<input type="text" id="theField" value="300" />
<a href="#" onclick="document.location.href = 'file.php?theField=' + encodeURIComponent(document.getElementById('theField').value);">Send</a>

-> file.php with $_GET['theField'] = 300;


<form id="theForm" action="file.php" method="POST">
<input type="text" name="theField" value="300" />
<a href="#" onclick="document.getElementById('theForm').submit();">Send</a>
</form>

-> file.php with $_POST['theField'] = 300;


<form id="theForm" action="file.php" method="GET">
<input type="text" name="theField" value="300" />
<a href="#" onclick="document.getElementById('theForm').submit();">Send</a>
</form>

-> file.php with $_GET['theField'] = 300;

...