You'll need to explain that a bit better. All form fields that have a value will be submitted and available to your PHP script through the $_GET variable or the $_POST variable. It might be an idea to post your code and we'll be able to answer more clearly.
Actually i dont want to sumit form,so i dont want to use $_GET or $_POST. I meant for example i have a page named mypage.php and in this page i have made a form using echo"<form name='form1'> <input type='text' name='name'></form"; then if i want to assign value document.form1.name.value like this: $var= document.form1.name.value; how can it be possible???
PHP is used to construct the page and to give the <input> a value. By the time the user fills it in the PHP script is finished. If you want to do any validation you have to either * submit the form * use javascript
Use a if-else condition to do that. 'isset' checks the submit button pushed or not. if(isset($_POST['go'])) { $input1=$_POST['input1']; $input2=$_POST['input2']; ................... } else{ echo " your html form here, where name of submit button is go "; } Hope this will help you.
If you want the value to be assigned while in the same page you just need the form action on submit to reload the page. This can be done without using a submit button using javascript events. So unless the page takes a long time to reload it's pretty transparent to the end user.