Ghussaizzain Biturre
New member
i have this at the moment:
<?php
// start of center
if ($_POST)
{
// Saving file
$File = $_POST['File_name'];
$File_contents = $_POST['File_contents'];
file_put_contents($File, $File_contents, LOCK_EX);
echo "new file $File contents: </br>";
echo $File_contents;
}
else {
// loading file
$File_contents = file_get_contents("$File");
?>
<h<?php echo $Text_header;?>>Editing file: <?php echo $File;?></h<?php echo $Text_header; ?>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
File name:
<input type="text" name="Filename" value="<?php echo $File; ?>"></br></br>
File contents: </br>
<textarea name="File_contents" cols="90" rows="40" >
<?php echo $File_contents; ?></textarea></br>
<h5>Commit changes: Yes<input type="radio" name="Choice" value="Yes">No<Input type="radio" checked name="Choice">
Insert Password: <input type="text" name="Password"></h5>
<input type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2"></form>
<?php
}
// end of center
?>
it will display but when i click submit it just does nothing plz help (i would like to stay with php on this one) thanks!!!
also this form is copied from a login script and adapted as such the login script is fully functional and holds no errors
<?php
// start of center
if ($_POST)
{
// Saving file
$File = $_POST['File_name'];
$File_contents = $_POST['File_contents'];
file_put_contents($File, $File_contents, LOCK_EX);
echo "new file $File contents: </br>";
echo $File_contents;
}
else {
// loading file
$File_contents = file_get_contents("$File");
?>
<h<?php echo $Text_header;?>>Editing file: <?php echo $File;?></h<?php echo $Text_header; ?>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
File name:
<input type="text" name="Filename" value="<?php echo $File; ?>"></br></br>
File contents: </br>
<textarea name="File_contents" cols="90" rows="40" >
<?php echo $File_contents; ?></textarea></br>
<h5>Commit changes: Yes<input type="radio" name="Choice" value="Yes">No<Input type="radio" checked name="Choice">
Insert Password: <input type="text" name="Password"></h5>
<input type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2"></form>
<?php
}
// end of center
?>
it will display but when i click submit it just does nothing plz help (i would like to stay with php on this one) thanks!!!
also this form is copied from a login script and adapted as such the login script is fully functional and holds no errors