Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Pass values from Javascript to PHP

Reply
Thread Tools

Pass values from Javascript to PHP

 
 
Thomas
Guest
Posts: n/a
 
      04-24-2006
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

 
Reply With Quote
 
 
 
 
ASM
Guest
Posts: n/a
 
      04-24-2006
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
 
Reply With Quote
 
 
 
 
Tim Williams
Guest
Posts: n/a
 
      04-24-2006
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" <(E-Mail Removed)> wrote in message news:(E-Mail Removed) 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Training Institute In Delhi, Live Projects on PHP. Short TermPHP Courses, PHP Scripts, PHP Training with Live Projects. Rajive Narain Java 0 09-18-2009 10:47 AM
Validate your html forms with javascript and php with a simple php class __ Javascript 1 10-02-2007 11:06 AM
Writing a PHP and Javascript generated page to a PHP variable... jonnyblazed@gmail.com Javascript 3 09-04-2006 12:45 PM
How is a PHP (.php) or JavaScript web site spidered by search engines? eastcoastguyz Javascript 1 07-11-2006 03:52 AM
[JAVASCRIPT, PHP, MYSQL] Pass Variable from a non-trigger frame to another. mailing@allstream.net Javascript 1 12-16-2005 10:53 PM



Advertisments