473,396 Members | 1,764 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.

Pass values from Javascript to PHP

Sorry if this is a really obvious question but I am new at this. I
would like to have my javascript pass some variables it gets to a php
page I have to log the inputs. The inputs are collected in forms but I
want the logging to be completely hidden from the user. Any
suggestions?
Thanks

Apr 24 '06 #1
2 7075
ASM
Thomas a écrit :
Sorry if this is a really obvious question but I am new at this. I
would like to have my javascript pass some variables it gets to a php
page I have to log the inputs. The inputs are collected in forms but I
want the logging to be completely hidden from the user. Any
suggestions?


J'ai rien compris!

From where come your JS variables ? (php write them ?)

The new values for these variables has to be put in inputs ?

document.forms[0].elements['hide_1'].value = myVariable;

but you can't hide your javascript ...
<form action="form_querry.php" method="post">
<p>Name : <input type=text name="name">
<p>Password : <input type=password name="pass">
<input type=hidden value="" name="hide_1">
<p><input type=submit value="OK">
</form>
--
Stephane Moriaux et son [moins] vieux Mac
Apr 24 '06 #2
var i = new Image();
i.src="h ttp://someserver.com/somedir/logging.php?blah=" + myJsVar;
Might want to encode your variables before sending...
Maybe also add another (random) querystring parameter to avoid caching.
Tim.
"Thomas" <an*************@gmail.com> wrote in message news:11**********************@v46g2000cwv.googlegr oups.com...
Sorry if this is a really obvious question but I am new at this. I
would like to have my javascript pass some variables it gets to a php
page I have to log the inputs. The inputs are collected in forms but I
want the logging to be completely hidden from the user. Any
suggestions?
Thanks

Apr 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Sue Barth | last post by:
Hi all, I hope I'm in the right ng for this... I made an .asp page that allows users to toggle thru a directory of photos. The page accomplishes the following: selects a directory of photos...
3
by: Nath | last post by:
Please help!? I am new to writing html, javascript, pretty new to MySQL but quite proficient at writing Perl and i'm a quick learner. I am building a database driven website and i am a little...
7
by: Andy Fish | last post by:
Hi, I have a javascript solution where page A launches page B in a second window and then they can pass data between them. That's all well and good. Now say page B wants to navigate to page C...
19
by: nazgulero | last post by:
Hello all, I wonder if anybody can give me a hint about what I have to do to get this working: I am creating a drop down box using the script below. The result is two text fields; now I want...
3
by: drec | last post by:
I am creating a search box that the user types a value in, and then this gets passed to another page called search.php I would like to be able to pass these values through the URL, but I cant...
1
by: colleen1980 | last post by:
Hi: Can any one please tell me that how to i pass the two textbox values in the new page. If i use the form action in the popup window page then the new page is open in the same popup window as i...
4
by: IRC | last post by:
hey, i am pretty new on javascript as well as PHP, Hey, anyone can you help me, how to pass the javascript array value to php page......... i want to retrieve the values which are arrayed on...
8
by: BigZero | last post by:
Hello, i need to pass some variables or value to javascript from php script. well all i need to pass to value to javascript that is with in same php file the two values r in php i need to pass...
9
by: btreddy | last post by:
Hii all, I've a a javascriptfunction in my master page JavaScript Function: var meetingID=null; var panelID=null; var fileGridID=null; function...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.