Hi There, I am developing an app using twitter API,in which any user can enter his twitter username in textbox and get his followers. On home.php , I am using jquery. on click event of button, I am calling getinfo.php and passing textbox value along with it. This is the case so far.
What I want to do? Right now my url is:
http://www.example.com
this redirects to
http://www.example.com/home.php
Now I wish that my URL should also work like this:
http://www.example.com/username
means when user will type sitename and his username he should get his results. As I am trying jquery first time, I am not getting how can I pass value of URL (username in this case) to getinfo.php directly?
or any other solution?
Can you guys help me with this? please ask for any details.
Your help will be greatly appreciated.
Thank you in advance.
Here is a posted code on demand the click event in jquery:
$(document).ready(function(){
$("#btonsubmit").bind('click', function(){
$.get('/getinfo.php?tnm='+$('#tnm').val(), '', function(data){
$('#get_data').html(data);
});
}
)};
// here tnm is name of textbox. and btonsubmit for button