Jump to content

any php, js , PEAR expects here that can help me?


friedice

Recommended Posts

 

friedrice is on a distinguished road

 

 

Join Date: Mar 2010

windows 7 professional

10 posts

melbourne

Philippines au victoria

 

 

  friedrice is online now Report Post 

 

any php, js , PEAR expects here that can help me?

ok im makin a gmap website for a uni subject

its in PEAR templates

problem i can seem to access the php variable in my js script

 

in test.php

i got

$address= $_POST['address']; which gets it from input in prev page

 

connected to dat php page is a test.tpl file where all html and js is there

i tried this and all sort of methods

var myVar = "<?php echo $address; ?>";

alert(myVar);

 

but all it shows it <?php echo $address; ?> in the alert box

 

i need that address value so i can pinpoint it on a gmap by calling a function like dat

 

showAddress(<?php echo $address; ?>);return false;

 

 

any ideas how to resolve it?

thx

 

[attachment deleted by admin]

Link to comment
Share on other sites

ya it is installed i presummed since all other functions are workin like the sql statements are fine, its jsut the gmap thing. 

and also i cant just call the js in php since its on different files .php and .tpl but on the same page

i tried using sessions but i couldnt get it to work im using PEAR templates

 

thx for ur replies

Link to comment
Share on other sites

If you see php code being displayed in your browser, it means that PHP is not interpreted on server. Does the file in question have a .php extension? If not, is the server configured to process such files as PHP?

Link to comment
Share on other sites

well im sure php is installed on the server since its a university server plus all other php stuff i used on other parts on the website works fine like rego and dynamically drop down boxes..

wat do u mean just incase and is there a way to check?

im guessin is dat js is not registering dat php variable since both are different server and client side tools.

Link to comment
Share on other sites

also wat im thinkin is dat if im unable to resolve it maybe i can just use the js script for gmap which is pretty long in side php echo but it doesnt folow the PEAR template in my understandin

or is it alright to include js in .php instead of .tpl since its part logic and presentation wise

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.