Page 1 of 1

Form-problems

Posted: Mon May 05, 2003 6:43 am
by suesicus
Why isn't this working?! Is there a problem in my PHP-configuration?!

The name of this document is testar.php

<html>
<head>
<title>Testing</title>
</head>
<body>

<?
echo $var;
?>

<form action="testar.php" method="post">
<input type="text" name="var">
<input type="submit" value="Shoot">
</form>

</body>
</html>

It's like it doesn't send the variable "$var" to the page. I've tried to send it to another page but it doesn't work there either!

Posted: Mon May 05, 2003 6:46 am
by []InTeR[]
If you view the source in the browser,
do you see <? echo $var ?> or nothing?

If you see <? echo $var ?> then your webserver doesn't know that you want to use php. Not a php-configuration problem, but a apache(or other webserver software) configuration problem.

Posted: Mon May 05, 2003 6:49 am
by suesicus
I see nothing..

if I write..

$var = "Hello";
echo $var;

.. I see Hello.. So somehow it doesn't send the variable from the form..

Posted: Mon May 05, 2003 6:55 am
by suesicus
It must be something wrong with my computer becouse it works on my server..

Maybe I have to reinstall PHP and all that stuff..

Posted: Mon May 05, 2003 7:00 am
by twigletmac
Please read:
viewtopic.php?t=511

Mac

Posted: Mon May 05, 2003 7:04 am
by suesicus
ahh...

THANKS!