Created
February 26, 2009 14:13
-
-
Save kodi/70869 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript" charset="utf-8"> | |
function mySubmit(){ | |
var q=document.getElementById('q'); | |
var s=document.getElementById('s'); | |
// ne zaboravi ovo hvata elemente po ID ju | |
// ne po name-u .. oba elementa moraju daimaju id | |
q.value=s.value; // to je cela nauka | |
} | |
</script> | |
</head> | |
<body> | |
<form action="" method="post" accept-charset="utf-8"> | |
<input type="text" name="s" value="" id="s"> | |
<input type="hidden" name="q" value="" id="q"> | |
<p><input type="submit" value="Continue »" onclick="mySubmit();"></p> | |
</form> | |
<?php | |
//dokaz | |
if(isset($_POST['q'])){ | |
echo "<pre>"; | |
print_r($_POST); | |
} | |
?> | |
<html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment