Page 1 of 1

writing to file help.. pleaaaaaase

Posted: Tue Nov 01, 2005 1:33 pm
by tymlls05
i have this script (and i know that the echo doesnt function to begin with) but i need this form to update a file everytime it is submitted. But this is all i could figure out.... any help please?


PHP Code:

Code: Select all

<form action="showspost.php" method="post"> 
<input type="text" name="date" value="Date"> 

<br> 
<input type="text" name="Event" value="Event"> 

<br> 
<input type="text" name="Place" value="Place"> 

<br> 
<textarea name="bands"> 
Bands 
</textarea> 

<br> 
<input type="submit" value="Submit"> 

</form> 

<?php 
echo ('<table>') 
echo('<tr><td>' $variablename=$_POST['date']; '</td><td>' $variablename=$_POST['event']; '</td><td>' $variablename=$_POST['Place']; '</td><td>' $variablename=$_POST['bands']; '</td><td>'  ) 
echo ('</table>') 

?>

Posted: Tue Nov 01, 2005 1:40 pm
by feyd
you have a lot of errors to begin with..

Code: Select all

<?php
echo ('<table>');
echo('<tr><td>' . $_POST['date'] . '</td><td>' . $_POST['event'] . '</td><td>' . $_POST['Place'] . '</td><td>' . $_POST['bands'] . '</td><td>'  );
echo ('</table>');

?>
those will write out to the display whether the script has been posted to or not.. so you will be generating notices in the background (at the least)


have a read through the examples found in and around fopen() for creation and manipulation of files..