Click to See Complete Forum and Search --> : post from webpage to webpage


elewi49
04-02-2005, 04:05 AM
I need help in finishing a project for my teachers to have a class webpage.
I have the page for the teachers to post homework and the page to post to. Once I post information it does not show up in the class webpage. The code I am using is POST:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>POST and GET functions</title>
</head>
<body bgcolor="#CCFFCC">
<!-- get.php will be the page we will send the data to. -->
<table cellpadding="2" cellspacing="2" border="2"><tr><td>
<form action="bvanoverget.php" method="get">

<b>

<b>Date:</b></b><input type="text" name="name"> <br>

<textarea rows="20" cols="90" name="message">
Daily Homework: <br>

Special Projects: <br>

Extra Credit: <br>

Calendar: <br>
</textarea>
<input type="submit" value="Go!"><input type="reset" value="Reset" name="B2">
</form></td></tr></table>
</body>
</html>

and RECEIVE PAGE:
<table cellspacing="2" cellpadding="2" border="2"><tr><td>
<?php
$name = $_GET["name"]; // This will get the name variable input from the form above
$message = $_GET["message"]; // This will get the message variable input from the form above
echo "<b>$name</b><br>$message"; // Displaying the input
?> </td></tr></table>
This is driving me crazy trying to figure out why it won't post.
ANy one have an answer
Ervin

<Eddie>
04-02-2005, 04:31 AM
Two things, your comment says "get.php" but your form action says "bvanoverget.php". If that's not the issue then look at your echo statement. Spot the errors. Check out php string concatenation (http://www.w3schools.com/php/php_syntax.asp).