hi

i've just started learning PHP.

i have downloaded phptriad 4.1 so that i can use php without uploading it to server.

For my feedback html file, i put:
<html>
<head>
<title>TAEKWONDO WEBSITE - Membership Form</title>
</head>
<body>
<font face="arial" size="4">
<p align="center"><big>Membership Form</big></p>
Please Fill In Your Details And Click Submit:
<br />
<fieldset><legend align="center">Personal Information</legend>

<form action="membership_form2.php" method="get">

First Name:<input type="text" name="name" size="10"/>
</fieldset>
</form>
</body>
</html>

FOR MY PHP FILE I PUT:
<html>

<head>

<title>TAEKWONDO WEBSITE - Membership Form</title>

</head>

<body>
<?php
ini_set ('display_errors',1);
register_globals
print "{$HTTP_GET_VARS}";
?>
</body>
</html>

SAVED PHP AS membership_form2.php & put all in same directory.

When i test it by filling in form & submit, Nothing appears its just a blank page?????????

any ideas?

mark

:eek:

maybe try this instead:
echo $_GET;

instead of

<html>

<head>

<title>TAEKWONDO WEBSITE - Membership Form</title>

</head>

<body>
<?php
ini_set ('display_errors',1);
//globals are usually on by default
echo $_GET['name'];
?>
</body>
</html>

depending on what version of php you are usign you may just be able to use $_GET instead of $HTTP_GET_VARS
i sure hope that works!

Crippz:

Obtaining POST and GET vars in PHP is pretty easy.

Try replacing:

ini_set ('display_errors',1);
register_globals
print "{$HTTP_GET_VARS}";

with

print($GLOBALS);

If that does work, just for kicks, try this as well:

print($name);

Good luck!

hi

i've just started learning PHP.

i have downloaded phptriad 4.1 so that i can use php without uploading it to server.

For my feedback html file, i put:
<html>
<head>
<title>TAEKWONDO WEBSITE - Membership Form</title>
</head>
<body>
<font face="arial" size="4">
<p align="center"><big>Membership Form</big></p>
Please Fill In Your Details And Click Submit:
<br />
<fieldset><legend align="center">Personal Information</legend>

<form action="membership_form2.php" method="get">

First Name:<input type="text" name="name" size="10"/>
</fieldset>
</form>
</body>
</html>

FOR MY PHP FILE I PUT:
<html>

<head>

<title>TAEKWONDO WEBSITE - Membership Form</title>

</head>

<body>
<?php
ini_set ('display_errors',1);
register_globals
print "{$HTTP_GET_VARS}";
?>
</body>
</html>

SAVED PHP AS membership_form2.php & put all in same directory.

When i test it by filling in form & submit, Nothing appears its just a blank page?????????

any ideas?

mark

:eek:

You need a submit button on your form..

something like <input type=submit value="Send it">

Your Form Below:

<html>
<head>
<title>TAEKWONDO WEBSITE - Membership Form</title>
</head>
<body>
<font face="arial" size="4">
<p align="center"><big>Membership Form</big></p>
Please Fill In Your Details And Click Submit:
<br />
<fieldset><legend align="center">Personal Information</legend>
<form action="membership_form2.php" method="get">
First Name:<input type="text" name="name" size="10"/>
</fieldset>
<input type="submit" name ="submit" value="Send">
</form>
</body>
</html>

membership_form2.php Below:

<html>
<head>
<title>TAEKWONDO WEBSITE - Membership Form</title>
</head>
<body>
 
<?php
 
error_reporting(1); // Error reporting set @ 1
 
/* I submitted a code snippet at this forum concerning register_globals = off >> You can read it at : http://www.daniweb.com/code/snippet484.html */
 
if (!ini_get('register_globals')) {
$superglobals = array($_SERVER, $_ENV,
$_FILES, $_COOKIE, $_POST, $_GET);
if (isset($_SESSION)) {
array_unshift($superglobals, $_SESSION);
}
foreach ($superglobals as $superglobal) {
extract($superglobal, EXTR_SKIP);
}
ini_set('register_globals', true);
}
print "$name";
?>
</body>
</html>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.