Re: [PHP] Javascript to PHP?
Thanks for the response, Erik! I think I will try passing the data in a cookie to a "hidden" frame, refreshing the frame, and then reading the data back. Many thanks to all for the suggestions! Cheers, Jed I liked it when Erik Price wrote this to me: > > On Saturday, June 29, 2002, at 03:13 PM, Jed Verity wrote: > >> I can't find any information on passing JavaScript variables to PHP on >> the >> same page (i.e. not through the POST information of a submitted form). >> Is >> this because it's not possible? >> >> To take the load off the server, I'm trying to do a bunch of string >> manipulations and loops in JavaScript and then hand that info off to PHP >> once it's done. > > How will you communicate with PHP without submitting an HTTP request of > some sort? So, really, you will need to submit -something-, though it > could be GET data, POST data, or COOKIE data. > > You can't have JavaScript talk to PHP "within the same page" since the > webserver/PHP "forgets" all information related to that page as soon as > it shoots it to the user-agent. > > I'm assuming you know how to use JavaScript to set a cookie, and/or make > a new request with GET or POST data attached. If not, let me know. > > > Erik > > > > > > > Erik Price > Web Developer Temp > Media Lab, H.H. Brown > [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript to PHP?
On Saturday, June 29, 2002, at 03:13 PM, Jed Verity wrote: > I can't find any information on passing JavaScript variables to PHP on > the > same page (i.e. not through the POST information of a submitted form). > Is > this because it's not possible? > > To take the load off the server, I'm trying to do a bunch of string > manipulations and loops in JavaScript and then hand that info off to PHP > once it's done. How will you communicate with PHP without submitting an HTTP request of some sort? So, really, you will need to submit -something-, though it could be GET data, POST data, or COOKIE data. You can't have JavaScript talk to PHP "within the same page" since the webserver/PHP "forgets" all information related to that page as soon as it shoots it to the user-agent. I'm assuming you know how to use JavaScript to set a cookie, and/or make a new request with GET or POST data attached. If not, let me know. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript to PHP?
On Sat, 29 Jun 2002 16:58:50 -0300, Jed Verity wrote: >Hello, Chris, > >Many thanks for the thorough description. It does make sense, of >course...I >was just hoping that there was some kind of funky loophole that >small brains >like mine couldn't comprehend. well if it's one-way only communication, you could load an image in javascript that is really a php page. that way you can send information to a php script without the browser reloading. there's probably other ways that a javascript guru could come up with (maybe loading content into an invisible layer??) this isn't the best place to be asking a javascript question tho. hth. - Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] JavaScript to PHP?
You might be able to pass them as a cookie. Bruce Karstedt President Technology Consulting Associates, Ltd. Tel: 847-735-9488 Fax: 847-735-9474 -Original Message- From: Jed Verity [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 29, 2002 2:59 PM To: Chris Shiflett Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Javascript to PHP? Importance: Low Hello, Chris, Many thanks for the thorough description. It does make sense, of course...I was just hoping that there was some kind of funky loophole that small brains like mine couldn't comprehend. Thanks again! Jed I liked it when Chris Shiflett wrote this to me: > Jed Verity wrote: > >> I can't find any information on passing JavaScript variables to PHP on the >> same page (i.e. not through the POST information of a submitted form). Is >> this because it's not possible? >> > Basically, this is not possible. > > A common area of confusion to those new to Web programming is the > distinction between client-side and server-side code. PHP is an example > of a server-side scripting language, while JavaScript is client-side. To > PHP, anything that is not PHP is simply output. It doesn't matter if the > output is HTML, JavaScript, XML, an image, etc. - it's all "not PHP." > > When a user requests a PHP script, the PHP part of the script is > executed prior to the output being sent to the client. Remember, the > output may contain JavaScript. Once the output reaches the browser, the > browser will attempt to render the HTML, execute the JavaScript, and > whatever else is appropriate. So, to get back to your question, you are > wanting to know how to have the browser (which is executing the > JavaScript) be able to send a JavaScript variable to PHP (which could be > thousands of miles away on whatever Web server the page was obtained > from) "on the same page," which means you want to be able to do this > without communicating back to the Web server. > > So, your question can be summarized into: > > "How can my browser send data back to the Web server without any further > communication with the Web server?" > > Hopefully that explains how it is impossible. > > The terms server-side and client-side are ignored by most people, > understandably, because this industry is littered with useless terms > that do little to describe what is really happening (in the case of "Web > services," the term is actually misleading in my opinion). However, > these terms are very descriptive, and once you can begin to understand > which code is executed on the server-side (by the Web server prior to > sending the response to the Web client) and which code is executed on > the client-side (by the Web client after receiving the response from the > Web server), all of these types of questions will make more sense to you. > > Hope that gives a good description of the difference and can help you > solve whatever problem you're currently working on. > > Chris > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript to PHP?
Hello, Chris, Many thanks for the thorough description. It does make sense, of course...I was just hoping that there was some kind of funky loophole that small brains like mine couldn't comprehend. Thanks again! Jed I liked it when Chris Shiflett wrote this to me: > Jed Verity wrote: > >> I can't find any information on passing JavaScript variables to PHP on the >> same page (i.e. not through the POST information of a submitted form). Is >> this because it's not possible? >> > Basically, this is not possible. > > A common area of confusion to those new to Web programming is the > distinction between client-side and server-side code. PHP is an example > of a server-side scripting language, while JavaScript is client-side. To > PHP, anything that is not PHP is simply output. It doesn't matter if the > output is HTML, JavaScript, XML, an image, etc. - it's all "not PHP." > > When a user requests a PHP script, the PHP part of the script is > executed prior to the output being sent to the client. Remember, the > output may contain JavaScript. Once the output reaches the browser, the > browser will attempt to render the HTML, execute the JavaScript, and > whatever else is appropriate. So, to get back to your question, you are > wanting to know how to have the browser (which is executing the > JavaScript) be able to send a JavaScript variable to PHP (which could be > thousands of miles away on whatever Web server the page was obtained > from) "on the same page," which means you want to be able to do this > without communicating back to the Web server. > > So, your question can be summarized into: > > "How can my browser send data back to the Web server without any further > communication with the Web server?" > > Hopefully that explains how it is impossible. > > The terms server-side and client-side are ignored by most people, > understandably, because this industry is littered with useless terms > that do little to describe what is really happening (in the case of "Web > services," the term is actually misleading in my opinion). However, > these terms are very descriptive, and once you can begin to understand > which code is executed on the server-side (by the Web server prior to > sending the response to the Web client) and which code is executed on > the client-side (by the Web client after receiving the response from the > Web server), all of these types of questions will make more sense to you. > > Hope that gives a good description of the difference and can help you > solve whatever problem you're currently working on. > > Chris > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Javascript to PHP?
Or setting a cookie in JavaScript. It will be transmitted on the next page request. -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 29, 2002 3:30 PM To: 'Jed Verity'; [EMAIL PROTECTED] Subject: RE: [PHP] Javascript to PHP? Not possible. You must refresh the page to send something back to PHP. Only workaround is using a hidden frame or layer and refreshing that... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Javascript to PHP?
> My apologies if this has been asked a thousand times. I've > just joined the list. I has, but you get that... > I can't find any information on passing JavaScript variables > to PHP on the same page (i.e. not through the POST information of a > submitted form). Is this because it's not possible? Short answer is no. PHP is server-side, Javascript is client-side. You can get variables from php to javascript when your php generates the page to be sent to the browser but you can only get variables back from php when you use browser to server communications (that's usually a form - be it get or post method, or a cookie). > To take the load off the server, I'm trying to do a bunch of string > manipulations and loops in JavaScript and then hand that > info off to PHP once it's done. You'll need to create all the javascript from you php page as it generates and then wait for it all to be done client-side and submitted back to the server. CYA, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript to PHP?
Jed Verity wrote: >I can't find any information on passing JavaScript variables to PHP on the >same page (i.e. not through the POST information of a submitted form). Is >this because it's not possible? > Basically, this is not possible. A common area of confusion to those new to Web programming is the distinction between client-side and server-side code. PHP is an example of a server-side scripting language, while JavaScript is client-side. To PHP, anything that is not PHP is simply output. It doesn't matter if the output is HTML, JavaScript, XML, an image, etc. - it's all "not PHP." When a user requests a PHP script, the PHP part of the script is executed prior to the output being sent to the client. Remember, the output may contain JavaScript. Once the output reaches the browser, the browser will attempt to render the HTML, execute the JavaScript, and whatever else is appropriate. So, to get back to your question, you are wanting to know how to have the browser (which is executing the JavaScript) be able to send a JavaScript variable to PHP (which could be thousands of miles away on whatever Web server the page was obtained from) "on the same page," which means you want to be able to do this without communicating back to the Web server. So, your question can be summarized into: "How can my browser send data back to the Web server without any further communication with the Web server?" Hopefully that explains how it is impossible. The terms server-side and client-side are ignored by most people, understandably, because this industry is littered with useless terms that do little to describe what is really happening (in the case of "Web services," the term is actually misleading in my opinion). However, these terms are very descriptive, and once you can begin to understand which code is executed on the server-side (by the Web server prior to sending the response to the Web client) and which code is executed on the client-side (by the Web client after receiving the response from the Web server), all of these types of questions will make more sense to you. Hope that gives a good description of the difference and can help you solve whatever problem you're currently working on. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript to PHP?
That's what I was afraid of. It makes sense, of course...I was just hoping there was some kind of hack. Thanks for responding! Jed I liked it when John Holmes wrote this to me: > Not possible. You must refresh the page to send something back to PHP. > Only workaround is using a hidden frame or layer and refreshing that... > > ---John Holmes... > >> -Original Message- >> From: Jed Verity [mailto:[EMAIL PROTECTED]] >> Sent: Saturday, June 29, 2002 3:14 PM >> To: [EMAIL PROTECTED] >> Subject: [PHP] Javascript to PHP? >> >> Hello, Folks, >> >> My apologies if this has been asked a thousand times. I've just joined > the >> list. >> >> I can't find any information on passing JavaScript variables to PHP on > the >> same page (i.e. not through the POST information of a submitted form). > Is >> this because it's not possible? >> >> To take the load off the server, I'm trying to do a bunch of string >> manipulations and loops in JavaScript and then hand that info off to > PHP >> once it's done. >> >> Any insight is appreciated! Thanks, >> Jed >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript to PHP?
I've done this stuff recently. I need to pass whole arrays betn. php and Javascript (2-way), here is some code: // PHP var. to JS function arrFromStr (str2convert) { // make an array from string arr = new Array(); var posOfQt1 = str2convert.indexOf('\"'); var posOfQt2 = str2convert.indexOf('\"', posOfQt1+1); i = 0; while(posOfQt1 != -1) { arr[i] = str2convert.substring(posOfQt1+1, posOfQt2); i++; posOfQt1 = posOfQt2; posOfQt1 = str2convert.indexOf('\"', posOfQt1+1); posOfQt2 = str2convert.indexOf('\"', posOfQt1+1); } return arr; } Call this function like this: layerDesStr = ''; layerDes[0] = arrFromStr(layerDesStr); In case you have a variable don't serialize, just do myJSvar = ; JS variables can be sent to PHP by including them in html forms, nothing special about it. > Hello, Folks, > > My apologies if this has been asked a thousand times. I've just joined the > list. > > I can't find any information on passing JavaScript variables to PHP on the > same page (i.e. not through the POST information of a submitted form). Is > this because it's not possible? > > To take the load off the server, I'm trying to do a bunch of string > manipulations and loops in JavaScript and then hand that info off to PHP > once it's done. > > Any insight is appreciated! Thanks, > Jed > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -Pushkar S. Pradhan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Javascript to PHP?
Not possible. You must refresh the page to send something back to PHP. Only workaround is using a hidden frame or layer and refreshing that... ---John Holmes... > -Original Message- > From: Jed Verity [mailto:[EMAIL PROTECTED]] > Sent: Saturday, June 29, 2002 3:14 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Javascript to PHP? > > Hello, Folks, > > My apologies if this has been asked a thousand times. I've just joined the > list. > > I can't find any information on passing JavaScript variables to PHP on the > same page (i.e. not through the POST information of a submitted form). Is > this because it's not possible? > > To take the load off the server, I'm trying to do a bunch of string > manipulations and loops in JavaScript and then hand that info off to PHP > once it's done. > > Any insight is appreciated! Thanks, > Jed > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] javascript to php ???????
On Wed, 14 Nov 2001 10:30:03 +1100, Martin Towell wrote: >That's why I put quotes around the words - obviously a function >would be >need to be written to do the "serialising" and a corresponding php >function >to retrieve the values and place them into an array again. oops, I guess I misread that. You're right, that's crazy enough to work. a serialize function in javascript that serializes things the same way as php would be very useful, probably an unserialize function would be too. >-Original Message- >From: Mark [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, November 14, 2001 10:28 AM >To: [EMAIL PROTECTED]; PHP General >Subject: RE: [PHP] javascript to php ??? > > >On Wed, 14 Nov 2001 10:16:42 +1100, Martin Towell wrote: >>"serialise" the array and make the "value" of a hidden field this >>value. >>Then in PHP "unserialise" it. > >that would work great if it were a php array, but I believe we're >talking about javascript arrays here. :) > >>-Original Message- >>From: fitiux [mailto:[EMAIL PROTECTED]] >>Sent: Wednesday, November 14, 2001 10:18 AM >>To: PHP General >>Cc: [EMAIL PROTECTED] >>Subject: Re: [PHP] javascript to php ??? >> >> >>>>Hi =) >>>>is it possible to pass a javascript array to php ??? >> >>>by the time javascript comes into play, php has already done it's >>>job >>>and left the building. If you mean can javascript pass variables to >>>a >>>new request for php to handle, then sure. >> >> >>Thanks for your reply. =) >> >>I have a little problem.. >>well.. with php I build an html page with javascript to validate a >>form, >>the action of this form is call again to the php page. >>I mean... >> test.php - (make an html page)---> question.html --- >>(submit >>form)> test.php >> >>I populated an array but now I need to pass this array to the same >>starting >>php page again. >> >>can I do this? >> >> >>--Patricio >> >> >>(I apology because my english is not good enough.. I hope that you >>can >>understand me.. ) >> >> >> >> > > -- Mark, [EMAIL PROTECTED] on 11/14/2001 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] javascript to php ????
No. You have to realise that JavaScript is client side, and PHP is server side, so -- apart from inserting those javascript values into a form and submitting it using code -- PHP and JavaScript cannot interact. Mike fitiux wrote: >Hi =) > >is it possible to pass a javascript array to php ??? > > >thanks. > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] javascript to php ????
One way I do this is with the following: var x = new Array(); x[0] = "zero"; x[1] = "one"; x[2] = "two"; // set the hidden input to a comma delimited string document.f.x_array.value = x.toString(); // alert(document.f.x_array.value); Hope this helps. Dean -Original Message- From: fitiux [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 4:54 PM To: PHP General Subject: [PHP] javascript to php Hi =) is it possible to pass a javascript array to php ??? thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] javascript to php ???? THANKS =)
Thanks to all for help me.. =) I hope to help someone soon. --Patricio.
RE: [PHP] javascript to php ???????
That's why I put quotes around the words - obviously a function would be need to be written to do the "serialising" and a corresponding php function to retrieve the values and place them into an array again. -Original Message- From: Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 10:28 AM To: [EMAIL PROTECTED]; PHP General Subject: RE: [PHP] javascript to php ??? On Wed, 14 Nov 2001 10:16:42 +1100, Martin Towell wrote: >"serialise" the array and make the "value" of a hidden field this >value. >Then in PHP "unserialise" it. that would work great if it were a php array, but I believe we're talking about javascript arrays here. :) >-Original Message- >From: fitiux [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, November 14, 2001 10:18 AM >To: PHP General >Cc: [EMAIL PROTECTED] >Subject: Re: [PHP] javascript to php ??? > > >>>Hi =) >>>is it possible to pass a javascript array to php ??? > >>by the time javascript comes into play, php has already done it's >>job >>and left the building. If you mean can javascript pass variables to >>a >>new request for php to handle, then sure. > > >Thanks for your reply. =) > >I have a little problem.. >well.. with php I build an html page with javascript to validate a >form, >the action of this form is call again to the php page. >I mean... >test.php - (make an html page)---> question.html --- >(submit >form)> test.php > >I populated an array but now I need to pass this array to the same >starting >php page again. > >can I do this? > > >--Patricio > > >(I apology because my english is not good enough.. I hope that you >can >understand me.. ) > > > > -- Mark, [EMAIL PROTECTED] on 11/13/2001
Re: [PHP] javascript to php ???????
Why, sure! In your FORM tag, use ACTION="test.php". You can send your JavaScript variable as part of the form, in a hidden form field such as INPUT TYPE="hidden" VALUE=myValue. The value of the variable will be available the next time test.php shows up as $myValue. You can then manipulate it to your heart's delight. At 03:17 PM 11/13/2001, fitiux wrote: > >>Hi =) > >>is it possible to pass a javascript array to php ??? > > >by the time javascript comes into play, php has already done it's job > >and left the building. If you mean can javascript pass variables to a > >new request for php to handle, then sure. > > >Thanks for your reply. =) > >I have a little problem.. >well.. with php I build an html page with javascript to validate a form, >the action of this form is call again to the php page. >I mean... > test.php - (make an html page)---> question.html ---(submit > form)> test.php > >I populated an array but now I need to pass this array to the same >starting php page again. > >can I do this? > > >--Patricio > > >(I apology because my english is not good enough.. I hope that you can >understand me.. ) Sliante, Richard S. Crawford http://www.mossroot.com mailto:[EMAIL PROTECTED] AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford "It is only with the heart that we see rightly; what is essential is invisible to the eye." --Antoine de Saint Exupéry "Push the button, Max!" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] javascript to php ???????
On Wed, 14 Nov 2001 10:16:42 +1100, Martin Towell wrote: >"serialise" the array and make the "value" of a hidden field this >value. >Then in PHP "unserialise" it. that would work great if it were a php array, but I believe we're talking about javascript arrays here. :) >-Original Message- >From: fitiux [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, November 14, 2001 10:18 AM >To: PHP General >Cc: [EMAIL PROTECTED] >Subject: Re: [PHP] javascript to php ??? > > >>>Hi =) >>>is it possible to pass a javascript array to php ??? > >>by the time javascript comes into play, php has already done it's >>job >>and left the building. If you mean can javascript pass variables to >>a >>new request for php to handle, then sure. > > >Thanks for your reply. =) > >I have a little problem.. >well.. with php I build an html page with javascript to validate a >form, >the action of this form is call again to the php page. >I mean... >test.php - (make an html page)---> question.html --- >(submit >form)> test.php > >I populated an array but now I need to pass this array to the same >starting >php page again. > >can I do this? > > >--Patricio > > >(I apology because my english is not good enough.. I hope that you >can >understand me.. ) > > > > -- Mark, [EMAIL PROTECTED] on 11/13/2001 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] javascript to php ???????
On Tue, 13 Nov 2001 20:17:32 -0300, fitiux wrote: > >>Hi =) >>>is it possible to pass a javascript array to php ??? > >>by the time javascript comes into play, php has already done it's >>job >>and left the building. If you mean can javascript pass variables >>to a >>new request for php to handle, then sure. > > >Thanks for your reply. =) > >I have a little problem.. >well.. with php I build an html page with javascript to validate a >form, >the action of this form is call again to the php page. >I mean... >test.php - (make an html page)---> question.html --- >(submit form)> test.php > >I populated an array but now I need to pass this array to the same >starting php page again. > >can I do this? sure. for GET you would just make a request out of the variables, i.e.: var url="/mypage.php?value[0]="+value[0]+"value[1]="+value[1]; document.location.href=url; you can do this in a loop if you want. for POST you would use hidden fields, i.e.: document.write(''); document.write(''); you could do this in a loop too. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] javascript to php ???????
"serialise" the array and make the "value" of a hidden field this value. Then in PHP "unserialise" it. -Original Message- From: fitiux [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 10:18 AM To: PHP General Cc: [EMAIL PROTECTED] Subject: Re: [PHP] javascript to php ??? >>Hi =) >>is it possible to pass a javascript array to php ??? >by the time javascript comes into play, php has already done it's job >and left the building. If you mean can javascript pass variables to a >new request for php to handle, then sure. Thanks for your reply. =) I have a little problem.. well.. with php I build an html page with javascript to validate a form, the action of this form is call again to the php page. I mean... test.php - (make an html page)---> question.html ---(submit form)> test.php I populated an array but now I need to pass this array to the same starting php page again. can I do this? --Patricio (I apology because my english is not good enough.. I hope that you can understand me.. )
Re: [PHP] javascript to php ???????
>>Hi =) >>is it possible to pass a javascript array to php ??? >by the time javascript comes into play, php has already done it's job >and left the building. If you mean can javascript pass variables to a >new request for php to handle, then sure. Thanks for your reply. =) I have a little problem.. well.. with php I build an html page with javascript to validate a form, the action of this form is call again to the php page. I mean... test.php - (make an html page)---> question.html ---(submit form)> test.php I populated an array but now I need to pass this array to the same starting php page again. can I do this? --Patricio (I apology because my english is not good enough.. I hope that you can understand me.. )
Re: [PHP] javascript to php ????
On Tue, 13 Nov 2001 19:53:48 -0300, fitiux wrote: >Hi =) > >is it possible to pass a javascript array to php ??? by the time javascript comes into play, php has already done it's job and left the building. If you mean can javascript pass variables to a new request for php to handle, then sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] javascript to php
what exactly are you trying to do? pass variables to a php script? then use a form with POST or GET...not that simple? describe better what you're doing then... -jack cam k wrote: > > does anyone know how to pass values in javascript variables to php > variables?? Or a workaround if no direct solution... > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]