ok well ill admit that im very new to php and im just starting to learn. i have a problem that i hope one of you can solve for me. im having trouble passing information from a form in a html file to a separate php file.
what im dealing with now is something like this:
---the html file with the form ----
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<form method="post" action="calculate.php">
<input name="one" type="text">
<input type="submit" value="blah" name="submit">
</form>
</body>
</html>
----and this is calculate.php----
<?php
echo "$one";
?>
so what am i doing wrong?
quick PHP help needed
Moderator: General Moderators
- gite_ashish
- Forum Contributor
- Posts: 118
- Joined: Sat Aug 31, 2002 11:38 am
- Location: India
check this:
Before Post Read: Concerning Passing Variables in PHP 4.2+
(viewtopic.php?t=511&start=0&postdays=0& ... 1c5400f616)
Before Post Read: Concerning Passing Variables in PHP 4.2+
(viewtopic.php?t=511&start=0&postdays=0& ... 1c5400f616)
-
stagnant filth
- Forum Newbie
- Posts: 3
- Joined: Tue Aug 26, 2003 2:05 am
If you have problem with "Note: undefined variable..." - you need to check register_globals in your php.ini file. If the parameter is "off" you need to use $HTTP_POST_VARS[] array to get posted var:
This should work.
Code: Select all
<?php
$var=$HTTP_POST_VARS["var"];
echo $var;
?>-
stagnant filth
- Forum Newbie
- Posts: 3
- Joined: Tue Aug 26, 2003 2:05 am
yeah!
Just edit the php.ini file 
If you have no access to it - then I don't know...
I'm a newbie too
If you have no access to it - then I don't know...
I'm a newbie too