Forum Moderators: open

Message Too Old, No Replies

show output var in php

         

Mansi

7:57 am on Feb 8, 2005 (gmt 0)

10+ Year Member



Lo All,

i am working with a javascript and a aray ,
when i klick on a link (onclick blabla(1) )
in the aray i have the numbers going to a word, this word needs to go into a php variable.

i was wondering if i could do it inside the javascript? or do i need to make a form to do it eventually?

thnx in advance

orion_rus

11:18 am on Feb 8, 2005 (gmt 0)

10+ Year Member



You should understand what php variable is a server side programming, but you now form ur variable in a client side, to send it to a server you should have a form with method (post or get) of sending it. You have another way to send it to a server. HTML has <iframe> tag in which u can change a source. U can form source with variables like with a get method and like it u can send it to a server if u didn't want to reload a page

Mansi

12:48 pm on Feb 8, 2005 (gmt 0)

10+ Year Member



yes i am sorry , didnt explain myself to well.

i know about the client and server side.

Ok i have a hidden field now , but no submit button to it,
i have a link where a js is calling a js function,
this fills the hidden field.
Now i want the info in this hidden field in a variable in php, i might be in the wrong forum here now , i think?

anyway , with the $_POST["hiddenfieldname"] , has no output cause i aint sending it thru the form.
But when i click the link i fill the hidden field now what going into the hidden field (without another submit) i want to have in a php variable.

it sounds a bit silly , but i am wondering if it is possible

orion_rus

3:42 pm on Feb 8, 2005 (gmt 0)

10+ Year Member



Hmm yes i think it is a php question. but i don't understand why are u need it in a server side, but you are in a client side now. And if you want manipulating with a server u should send ur form and recieve it in a $_POST variable list.
if u need to dinamycally insert content you can use an iframe
what i'm already said about it should be seems like this:
<iframe src="myinsertdatabase.php?myhiddenvariable=value" style="display:none">
and then in a myinsertdatabase.php
u should have a
$variable=$_GET['myhiddenvariable'];

What's all, may be i'm again not understand ur properly. Try to ask about it in a 88 forum