Jump to content

PHP Form Help


jrapin

Recommended Posts

PHP People,

I'm trying to print various values from a form I created. The form is called reservations and it uses the <form action="handlereservations_form.php" method="post"> command.

My handlereservations_form.php is very simple but won't work to print any of the requested fields from the form. I'm using the print "$organization <br />"; command, but it still doesn't work. This is the error message I am receiving: Notice: Undefined variable: organization in c:\Inetpub\wwwroot\Kewadin\conventions\handlereservation_form.php on line 11.

Here is the reservations.php form (it works nicely):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Your Feedback</title>
</head>
<form action="handlereservation_form.php"
  method="post">
            <td>
              <p><span class="textGreenBold">Registration Information</span></p>
              <p><span style="font-weight: bold">Organization:
              <input type="text" name="organization" size="38" />
              </span>          <br />
                <br />
        </table>
</body>
</html>
<!-- End Page Content -->

And here is the handlereservations_form.php file:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Your Feedback</title>
</head>

<body>
<?php // Script 3.4 - handlereservation_form.php// This page receives information from reservations.php.

print "Thank you $organization <br />";

?>
</body>
</html>
Link to comment
https://forums.phpfreaks.com/topic/27212-php-form-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.