Re: script problems
| From: | David Robley | Date: | Mon, 28 Apr 2003 11:25:27 +0000 |
| Subject: | Re: script problems | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145507@lists.php.net to get a copy of this message | ||
In article <000901c30d75$04332020$2404a40c@andy>, friendly@kaltelnet.net
says...
> hi i have tis web page:
> <html>
> <head>
> <title>test web page</title>
> </head>
>
> <body>
> <form name="form1" action="index2.php" method="post">
>
> <input type="text" name="element1"><br>
> <input type="checkbox" name="checkbox" value="checkbox1"
> checked>
> <input type="submit">
> </form>
> </body>
> </html>
>
> now the script index2.php??
>
> <?echo?>document.form1.element1.value<?;?>
> ....
> //all through the elements on the form...
>
>
> and my out put is:
> error on line 1 of index2.php?
> unknown or undefined object: document.form1.element1 is not defined
>
>
> im sort of lost now
>
> trying to use javascript with php
Interesting syntax you have there :-) Input types are available under PHP
as a variable of the same name as the "name" assigned in the INPUT tag -
if you are using later versions of PHP with register_globals off you will
need to access them as $_POST{"name"} when using the post method.
If you want to access those values via javascript, you'll need to include
the correct javascript in your receiving script.
--
Quod subigo farinam
$email =~ s/oz$/au/o;