473,396 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

retrieve the values from javascript in php

12
Hi,

Im working with some math pages. Im having page a with user input where the result would be printed with the help of javascript. And now i need to fetch those results and post it another php page using $_get.

How can i get the results of javascript to php page using the query string
Feb 21 '08 #1
3 1299
Markus
6,050 Expert 4TB
print a link to the php page with parameters?

somesite.com/?param1=21&param2=456

php
[php]
$_a = $_GET['param1'];
$_b = $_GET['param2'];

echo $_a + $_b;
[/php]
Feb 21 '08 #2
gemguy
12
hi Mark,

I have to get those querystring values as a result of javascript function execution. How to get it from query string. Thanks in advance

print a link to the php page with parameters?

somesite.com/?param1=21&param2=456

php
[php]
$_a = $_GET['param1'];
$_b = $_GET['param2'];

echo $_a + $_b;
[/php]
Feb 22 '08 #3
hsriat
1,654 Expert 1GB
hi Mark,

I have to get those querystring values as a result of javascript function execution. How to get it from query string. Thanks in advance
After you print the page, add this...

Expand|Select|Wrap|Line Numbers
  1. var getString = 'a=' + a + '&b=' + b; //and so on for all the data to be sent to PHP
  2. window.location.replace('afterExecutionPage.php?'+getString);
  3. //or use window.location = ".......";
Feb 22 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Eugfene | last post by:
I have the following function in a html file: function selectEdit(fileID, processCode, processID, fileName,fileDesc) { document.forms.recordID.value = fileID; document.forms.processor.value =...
2
by: MyndPhlyp | last post by:
For IE, I can retrieve an array of tags using: document.all.tags("tagname") For NS6 & 7 I can use: document.getElementsByTagName("tagname") Is there an equivalent for that ancient NS...
0
by: Anon | last post by:
I have an XML document that stores configuration settings for an app. I generated the schema using vs.net and also the corresponding dataset. I can load the config file (config.xml - below) and get...
11
by: Patricio | last post by:
Hello all I open a PopUp that receives two variables (values). This PopUp must return a value as well. How can I retrieve this value? Thanks a lot.
6
by: Daz | last post by:
Hi everyone. Firstly, I apologise if this i not what you would call a PHP problem. I get quite confused as to what lives in which realm, so if this shouldn't be posted here, please suggest where...
7
gchq
by: gchq | last post by:
Hi there Here is the situation - a table is built dynamically with values in the cells I need to retrieve and enter into a database. I have found a way of getting values using JavaScript, but of...
4
by: Matt | last post by:
I am no JavaScript guru so please bear with me and be as detailed as possible with your response. I thank you in advance. I have an ASP page that contains form elements. I also have an inline...
4
by: divina11 | last post by:
I'm trying to retrieve the options below, depending on the one the user selects, I'm bulliding a Calculator Program where user inputs 2 values via input box and then selects an operation: Code:...
2
by: phpachu | last post by:
Hi, I hav created a group of textboxes using a loop and its names are unique and names are assigned using variable ( like <input type=text name=$name1>). Then How can i retrieve the values in...
1
by: divya | last post by:
Hello, I used the below code to move selected items between two listboxes Left and Right:- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestPopup.aspx.cs" Inherits="TestPopup" %> ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.