Using JavaScript variables as part of PHP

General discussions related to php

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 8
Joined: Mon Feb 17, 2003 4:53 pm

Mon Feb 17, 2003 5:01 pm

Hello. I am new to PHP and learning the language. I have JavaScript variables on a .htm page. I have another page that is a .php. What I like to do is use a variable like say for instance: var time; and manipulate it in my PHP file. Can anyone show me how it is done? Thanks.

New php-forum User
New php-forum User
Posts: 67
Joined: Mon Feb 24, 2003 2:55 am
Location: ../Ukraine/Kherson

Mon Feb 24, 2003 5:02 am

ONLY Submit form!!!

echo "MyVar=".$_POST["MyInp"];
echo "<BR>";
echo "MyVar1=".$_POST["MyInp1"];
<FORM name="name" method="POST" action="<? echo $_SERVER['PHP_SELF'];?>">
var MyParam= 123; MyParam;
<INPUT type="hidden" name="MyInp">
<INPUT type="text" name="MyInp1" value="10">
<INPUT type="submit">
PHP+MySql= Love :)

Post Reply