passing password values using javascript/ajax to php page
<p>iam using a simple insert script function to pass the values from registration html page to register php page.
Here is my script:</p>

<pre><code>function insert() {
// Optional: Show a waiting message in the layer with ID login_response
document.getElementById('insert_response').innerHTML = "Just a second..."
// Required: verify that all fileds is not empty. Use encodeURI() to solve some issues about character encoding.
var dispname= encodeURI(document.getElementById('disp_name').value);
var firstname= (document.getElementById('first_name').value);
var lastname= (document.getElementById('last_name').value);
var gender= (document.getElementById('genderreg').value);
var day= (document.getElementById('day').value);
var month= (document.getElementById('month').value);
var year= (document.getElementById('year').value);
var country= (document.getElementById('countryreg').value);
var city= (document.getElementById('cityreg').value);
var suburb= (document.getElementById('suburbreg').value);
var email= (document.getElementById('emailreg').value);
var password= (document.getElementById('regpassword').value);
var code= (document.getElementById('code').value);
var service= (document.getElementById('termservice').value);

// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'register_insert.php?site_url='+dispname+'&amp;fname= '+firstname+'&amp;lname= '+lastname+'&amp;gender= '+gender
       +'&amp;day= '+day+'&amp;month= '+month+'&amp;year= '+year+'&amp;country= '+country+'&amp;city= '+city+'&amp;suburb= '+suburb
       +'&amp;email= '+email+'&amp;password= '+password+'&amp;code= '+code+'&amp;service= '+service+'&amp;nocache= '+nocache);
http.onreadystatechange = insertReply;
http.send(null);
}
</code></pre>

<p>I just have a small question that is it a good pratice of passing the password values like this from html to php page. If it is not good idea then what is the best why to do so.</p>

<p>Thanks in advance for sugesstions.</p>
