ссылка
<form name="myform" method="post">
<input type="text" name="mytext" value="http:\\">
<br>
<input type="submit" value="добавить ссылку" name="send">
<br>
</form>
<?php
$filename = "data.txt";
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
echo $contents;
if ($_POST['send']){
echo "<a href=\"{$_POST["mytext"]}\">".$_POST["mytext"]."</a>"."<br>";
$fp = fopen('data.txt', 'a');
fwrite($fp, "<a href=\"{$_POST["mytext"]}\">".$_POST["mytext"]."</a>");
fwrite($fp,"<br>");
}
?>
|