0

This is probably a stupid question, but I don’t know this stuff and need some help. I have a form with 2 text box, and I want to pass the user-entered contents of the 1st text box to a php variable ($size)(without posting the page) on onBlur of 1st textbox. how do i do this???

Edited by nitnayak: n/a

5
Contributors
5
Replies
7
Views
6 Years
Discussion Span
Last Post by tomato.pgn
0

This is probably a stupid question, but I don’t know this stuff and need some help. I have a form with 2 text box, and I want to pass the user-entered contents of the 1st text box to a php variable ($size)(without posting the page) on onBlur of 1st textbox. how do i do this???

my code is

<body>
<?php
 function MonthDays($someMonth, $someYear)

      {

      return date("t", strtotime($someYear . "-" . $someMonth . "-01"));

      }
//for example	  


$someMonth=2;	// i want   $someMonth=monthtxt.value
$someYear=2011; // i want $someYear=yeartxt.value
$d=MonthDays($someMonth, $someYear);	
echo $d;  

 
?>

<form name="tt">
month<input type="text" class="contact_input" name="monthtxt"   >
<br>
year<input type="text" class="contact_input" name="yeartxt" >
<br>
Total days<input type="text" class="contact_input" name="yeartxt" id="" value="<?php echo $d ; ?>" >
</form>
</body>

Edited by Ezzaral: Added code tags. Please use them to format all code that you post.

0

u can even use javascript to solve this stuff.....try it ...i will return after 2 days n give u the code.....till then hope either other solve ur prblm or u have solved it urself.....
PS :-i m at present busy wid my project stuff....

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.