Javascript to call PHP function

This project was awarded to Minase for $50 USD.

Get free quotes for a project like this
Employer working
Awarded to:
Skills Required
Project Budget
$30 - $250 USD
Total Bids
Project Description

I'm really stuck with one javascript...

<SCRIPT TYPE="text/javascript">
[url removed, login to view]("<?php include("[url removed, login to view]"); ?>");
// test php returns echo "ok";

var Balance = 10;
if (Balance != 0)
var string = "<?php GetBalance(50);?>";
[url removed, login to view](string);


// PHP
function GetBalance($balance){
echo $balance;
this prints 50 and is working fine.

the problem is, I want to make it use JS Balance var.
something like <?php GetBalance(Balance);?>
but I can't make it work...

I'm looking for simple, one line solution :)

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online