Jump to content

Wow, this should be easy, but it isn't working for me


simedogz

Recommended Posts

Hello, this is a great resource I stumbled upon.

 

I am a total beginner and am trying to do this php tutorial: http://devzone.zend.com/node/view/id/626,

 

The code prompts a user to enter some text into a form.  a separate php 'page' displays the output.  For some reason this is not working.  When I enter text into the text box and press send, message.php opens up but nothing is displayed.

 

Here is the form code(form.html):

 

<html>

<head></head>

<body>

<form action="message.php" method="post">

Enter your message: <input type="text" name="msg" size="30">

<input type="submit" value="Send">

</form>

</body>

</html>

 

 

Here is the php code (message.php)

 

<html>

<head></head>

<body>

 

<?php

// retrieve form data

$input = $_POST['msg'];

// use it

echo "You said: <i>$input</i>";

?>

 

</body>

</html>

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.