473,405 Members | 2,176 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 1093
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
10
by: Boobie | last post by:
var myString = new String("Hello world") ; var myString = "Hello world" ; There is NO difference between the two right ? both creates a String obj right ?
12
by: Winbatch | last post by:
Hi, I'm trying to learn multithreading and it doesn't seem to be working for me. I have a feeling it has to do with the fact that I'm writing to files rather than to printf, but maybe not. ...
1
by: Oliver | last post by:
I'm an expert C# programmer (honest) but... the following code prints 'Oranges', not 'ORANGES' - this confuses me because I thought reference types (eg string) where passed by...err..reference -...
20
by: weston | last post by:
I've got a piece of code where, for all the world, it looks like this fails in IE 6: hometab = document.getElementById('hometab'); but this succeeds: hometabemt =...
8
by: kathy | last post by:
If I have 2D array like: int **p; p = new int*; for(int i=0;i<10;i++) { p = new int; }
3
by: James Robertson | last post by:
I am new to the ASP and VB thing so be kind. Question I have is that I have created an ASPX web site to use as an E-Mail page. But I want to use this for a lot of users. Can I create the link on...
14
by: MartinRinehart | last post by:
Working on parser for my language, I see that all classes (Token, Production, Statement, ...) have one thing in common. They all maintain start and stop positions in the source text. So it seems...
7
by: rmurgia | last post by:
When a variable is created using Javascript, should it then be able to be read immediately using embedded VB code or does the submit command have to be entered or are the variables between...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.