Form by example.
$fullname = 'John Travolta';
<input type="text" name="fullname" />
<input name="same" type="checkbox" /> Tick if same name
- When we tick on the checkbox the
input fullnamewill insert automatically by data from$fullname - How to do that by javascript, jquery or etc ?
You should use javascript (or JQuery, which is a javascript library) to do this, but since $fullname is probably a PHP variable you will need to use that too.
A simple javascript example (which can probably done a bit neater with JQuery) that uses the php variable:
this calls a javascript function that should look something like