Pass javascript value into php code

Completed Posted Jan 16, 2014 Paid on delivery
Completed Paid on delivery

This is very small project. The task is pass value of javascript variable into php code.

The script is this:

<script>

var url = [url removed, login to view];

//var url = [url removed, login to view]("http:\/\/");

var exp = [url removed, login to view](/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/);

var $url_username = exp[5].split("/")[1];

[url removed, login to view]($url_username);

</script>

<?php echo $url_username;?>

When I try to echo the value using php it is not working.

So the task is add and or change code in order to be able to use javascript value in php code. But any solution must not disturb my url format, which is [url removed, login to view]

I think that anyone with good knowledge of javascript/php can do it in 5 -10 min. Bid only if you can provide me solution quickly.

AJAX JavaScript jQuery / Prototype PHP

Project ID: #5328774

About the project

5 proposals Remote project Active Jan 16, 2014

Awarded to:

Cfurku

hello. i have it ready already. do you want me to send it? ////////////////////////////////////////////////////////////

$17 USD in 1 day
(6 Reviews)
4.7

5 freelancers are bidding on average $29 for this job

renardpaul

Hello, expert in JavaScript and PHP programming here. I can modify your code in order to be able to send variables from JavaScript to PHP. If you are interested we can talk, Paul

$60 USD in 1 day
(90 Reviews)
6.2
GisOnline

I can fix it for you right now. Your code will never execute like what you want. If you may tell me what do you want to do then I will change it as you want. I'm very happy if you may check my awesome feedback here: h More

$25 USD in 0 days
(44 Reviews)
5.2
jorgovan

Hello. I have a lot of experience ij javascript and php. Contact me to talk before if you are inerested Thanks Koran

$22 USD in 1 day
(19 Reviews)
4.5
srehanuddin

This is not possible to you get javascript variable in php, you can get php variable in javascript, because is server side language, As i see your requirement, there is a only way to do that thing, you need to get req More

$20 USD in 1 day
(0 Reviews)
0.0