To znowu ja...

, muszę przyznać że w php siedzę jakieś 48 godzin i chyba sam nie dam rady tego skryptu napisać. próbowałem sam ale jako nowicjusz nie dam rady dlatego też ten temat umieściłem w tym dziale. skrypt ma zmieniać konkretną frazę (słowo) w pliku tekstowym na frazę wpisaną w formularzu metodą POST... Jeśli wiecie jak to zrobić to naprawdę będę bardzo wdzięczbny za gotowy skrypt. Ja od 10 godzin prubuje i nic ...

Macie tu chłopcy jak zwykle musiałem zrobić sam

gotowy skrypt wraz z formularzem typu post

<?php
if (empty($_POST['submit'])) {
echo "<table border="0"><form method="post
"> <tr>
<td><span style="color: #FFFFFF; text-align: center;">
<p><p> <p><p> earn more because of the traffic.<p> </span></td>
<td><textarea name="tresc" style="width: 390px; height: 445px"></textarea></td>
</tr>
<tr>
<td><span style="color: #FFFFFF; text-align: center;">FIRST NAME:</span></td>
<td><input type="text" name="title" style="width: 250px"></td>
</tr>
<tr>
<td><span style="color: #FFFFFF; text-align: center;">hghg:</span></td>
<td><input type="text" name="keywords" style="width: 250px"></td>
</tr>
<tr>
<td><span style="color: #FFFFFF; text-align: center;">hfghS:</span></td>
<td><input type="text" name="description" style="width: 250px"></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="submit" value="SEND ARTICLE">
<input type="reset" value="CLEAR ARTICLE"></td></form>
</tr>
</table>";
}
elseif (!empty($_POST['tresc']) && !empty($_POST['title']) && !empty($_POST['keywords']) && !empty($_POST['description'])) {
$tresc = $_POST['tresc'];
$title = $_POST['title'];
$description = $_POST['description'];
$keywords = $_POST['keywords'];
$old_string = "index.txt";
$replacements = array("_" => "$tresc", "#" => "$title", "^" => "$keywords", "*" => "$description");
$tekst="";
$read_string=@fopen($old_string,"r+"); while(!feof($read_string)) { $tekst.=fread($read_string,500
); }
$new_tekst = strtr($tekst,$replacements); fwrite($read_string, $new_tekst); rename("index.txt","index.htm"); echo "<div align="center
"><strong><P>THANK YOU FOR ADDING!<P>BLE BLE BLE!<p>OK</strong></div>"; }
else echo "<span style="color
: #FF0000; text-align: center;">Go back and correct !</span>"; ?>