468,278 Members | 1,580 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,278 developers. It's quick & easy.

Basic variable passing

I am setting up a web form that will take data and pass it along to a
PHP script. I am noticing that the PHP doesn't get the information from
the HTML, or at least isn't displaying it. I set up a basic "test"
HTML/PHP combo. Here is what I have for the HTML:

<html>
<head>
</head>
<body>
<form method=post action="test.php">
<INPUT NAME="Author" TYPE="text">
<input type=Submit >
</form>
</body>
</html>

Here is what I have for the PHP:

<html>
<head>
</head>
<body>
<?php
echo $Author;
?>
</body>
</html>

I have verified that PHP is installed on the server using phpinfo(). I
tried both the POST and GET methods. The PHP just comes up blank (If I
type in HTML text, it displays, so I know test.php is being called). I
even tried removing all HTML tags from test.php. I have tried uploading
the the same pages to two different servers. Any help will be greatly
appreciated.

Nov 7 '06 #1
3 970
On 7 Nov 2006 09:24:52 -0800, "Jerim79" <my***@hotmail.comwrote:
>I am setting up a web form that will take data and pass it along to a
PHP script. I am noticing that the PHP doesn't get the information from
the HTML, or at least isn't displaying it. I set up a basic "test"
HTML/PHP combo. Here is what I have for the HTML:
[snip]
><?php
echo $Author;
?>
[snip]
>
I have verified that PHP is installed on the server using phpinfo(). I
tried both the POST and GET methods. The PHP just comes up blank (If I
type in HTML text, it displays, so I know test.php is being called). I
even tried removing all HTML tags from test.php. I have tried uploading
the the same pages to two different servers. Any help will be greatly
appreciated.
http://www.php.net/manual/en/languag...s.external.php

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Nov 7 '06 #2

Jerim79 wrote:
I am setting up a web form that will take data and pass it along to a
PHP script. I am noticing that the PHP doesn't get the information from
the HTML, or at least isn't displaying it. I set up a basic "test"
HTML/PHP combo. Here is what I have for the HTML:

<html>
<head>
</head>
<body>
<form method=post action="test.php">
<INPUT NAME="Author" TYPE="text">
<input type=Submit >
</form>
</body>
</html>

Here is what I have for the PHP:

<html>
<head>
</head>
<body>
<?php
echo $Author;
?>
</body>
</html>

I have verified that PHP is installed on the server using phpinfo(). I
tried both the POST and GET methods. The PHP just comes up blank (If I
type in HTML text, it displays, so I know test.php is being called). I
even tried removing all HTML tags from test.php. I have tried uploading
the the same pages to two different servers. Any help will be greatly
appreciated.
Change $Author to $_POST['Author'] then read this:
<http://www.php.net/register_globals>

Nov 7 '06 #3
Thank you both for the help. That was the problem. (I guess the cheap
book I picked up at the local store wasn't such a deal after all.)

Jerim79 wrote:
I am setting up a web form that will take data and pass it along to a
PHP script. I am noticing that the PHP doesn't get the information from
the HTML, or at least isn't displaying it. I set up a basic "test"
HTML/PHP combo. Here is what I have for the HTML:

<html>
<head>
</head>
<body>
<form method=post action="test.php">
<INPUT NAME="Author" TYPE="text">
<input type=Submit >
</form>
</body>
</html>

Here is what I have for the PHP:

<html>
<head>
</head>
<body>
<?php
echo $Author;
?>
</body>
</html>

I have verified that PHP is installed on the server using phpinfo(). I
tried both the POST and GET methods. The PHP just comes up blank (If I
type in HTML text, it displays, so I know test.php is being called). I
even tried removing all HTML tags from test.php. I have tried uploading
the the same pages to two different servers. Any help will be greatly
appreciated.
Nov 7 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Michael Foord | last post: by
10 posts views Thread by Boobie | last post: by
12 posts views Thread by Winbatch | last post: by
1 post views Thread by Oliver | last post: by
8 posts views Thread by kathy | last post: by
14 posts views Thread by MartinRinehart | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by zattat | last post: by
1 post views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.