...

View Full Version : passing variable through javascript in PHP



thindrakhya
08-21-2007, 06:34 PM
hi all

i am changing the variable value through javascript button click eg

function setMode()
{
document.FrmMaster.hidEditVariable.value='DC';

document.FrmMaster.submit();
}


this works fine when i am using on localt host using apache
now i have uploaded the files on godaddy and my variables like
hideditvariable is not chnaged when i click on the buttons
i don't know what setting needs to be changed for webserver as it works on loal host

one thing more ,
initially i was using variables like $abc on php
but this did'nt work on godaddy i had to use $_GET["abc"] to work on godaddy
i dont' know why?

Inigoesdr
08-21-2007, 06:39 PM
hi all

i am changing the variable value through javascript button click eg

function setMode()
{
document.FrmMaster.hidEditVariable.value='DC';

document.FrmMaster.submit();
}


this works fine when i am using on localt host using apache
now i have uploaded the files on godaddy and my variables like
hideditvariable is not chnaged when i click on the buttons
i don't know what setting needs to be changed for webserver as it works on loal host
Javascript is client-side so it should be the same regardless of the server software/setup. And this belongs in the Javascript forum.

one thing more ,
initially i was using variables like $abc on php
but this did'nt work on godaddy i had to use $_GET["abc"] to work on godaddy
i dont' know why?

Because they have register globals off. You should be using superglobals anyway. $_GET, $_POST, $_COOKIE, $_SESSION, etc.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum