Skip to content

Tag: variables

Pass PHP variable from HTML form to Javascript

could you help me pass a variable that was taken from a html form into javascript. The form asks for the tablename It is passed through PHP: A first action is underway, and created successfully: the Geoserver postgis table is created through PHP curl (entire code below) then the javascript tries to get $table…

How to Use an Outside Variable Inside a For Loop (Scope)

Simple question that I haven’t seen answered anywhere: How can I use an outside $variable, inside a for loop? In my PHP code, I have a SplDoubleyLinkedList full of friends names, and I am looping through them one by one to use in an if statement that compares the current friend to the $friend name param…