function miniatures() {
var ghi = "?user=jim&user2=jv";
window.location = "http://localhost/ghi.php" + ghi;
}
Though I still would like to know how to turn a js var into a php var. I think AjAX will do that, but I haven’t found the way. Do you have a reference for that, or can share the notation?
The short answer is you can’t directly because as mentioned earlier, php code is run on the server before any html is sent down “the pipe” to the browser where your javascript is run.
Your options include to use AJAX (if you don’t want a page refresh) or send the variable’s value in a query string to a php script and assign the sent value to a php variable and then do whatever processing you need server side before redirecting to wherever. But your options will depend on what you are trying to do overall.