Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

some php commands doens't work on my server

Status
Not open for further replies.

phpwormy

Technical User
Jan 10, 2005
4
NO
Hi!
When I've just put up my own web server, with php4.
the php is working (atleast "echo" commands and so on")
but the problem is when I try yo get html "variables" to php...

Here is an example of that... the code works on other PHP servers, but not on mine..
Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Favourite Band</title>
</head>
<body>
<?php
if (empty($band))
{
?>
<form method="post" action="">
	<p>What is your favourite Band?<br><input type="text" name="band" size="20"><input type="submit" value="Submit"></p>
</form>
<?
}
else
{
echo "Your favourite Band is: $band";
}
?>
</body>
</html>
I know I'm not good at php, but atleast the script works on other PHP servers, but not at mine.. any ideas...
It's not just this script, but also other similar scripts...
Is it any extensions or something?
 
btw, I'm using Windows 2000 server, IIS(4 or something)...
 
You will need to access it like this:
Code:
$band=$_POST("band"]
The automatic registering is turned off by default these days
 
okey, thanks =)
but do you know how to turn it on?
is it a command in php.ini or something?
 
okey!
thanks for the advise :)
I really like this forum =)

maybe I'l bug U guys more later.. :p
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top