Help needed in dealing with URL

chrisd

New Member
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:\[code\]http://www.example.com\[/code\] this redirects to \[code\]http://www.example.com/home.php\[/code\]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 demandthe click event in jquery:\[code\]$(document).ready(function(){ $("#btonsubmit").bind('click', function(){$.get('/getinfo.php?tnm='+$('#tnm').val(), '', function(data){ $('#get_data').html(data); });})};\[/code\]// here tnm is name of textbox. and btonsubmit for button
 
Back
Top