Pytałem o to na forumweb ale nikt mi nie pomógł więc piszę tu.
Jestem początkujący w php i proszę Was o pomoc:
Chcę zrobić formularz do edycji zmiennych w innym pliku. Napisałem tyle i nie mam pojęcia co zrobić dalej:
Plik index.php
Kod
<?
include("config.php");
?>
<form action="config.php" method="post">
<p>Tytuł strony <input type="text" value="<? echo("$tytul"); ?>" name="tytul"></p>
<p>Opis strony <input type="text" value="<? echo("$opis"); ?>" name="opis"></p>
<p>Adres Stylu CSS <input type="text" value="<? echo("$styl"); ?>" name="styl"></p>
<p>Autor strony <input type="text" value="<? echo("$autor"); ?>" name="autor"></p>
<input type="submit" value="Wyślij Dane">
</form>
include("config.php");
?>
<form action="config.php" method="post">
<p>Tytuł strony <input type="text" value="<? echo("$tytul"); ?>" name="tytul"></p>
<p>Opis strony <input type="text" value="<? echo("$opis"); ?>" name="opis"></p>
<p>Adres Stylu CSS <input type="text" value="<? echo("$styl"); ?>" name="styl"></p>
<p>Autor strony <input type="text" value="<? echo("$autor"); ?>" name="autor"></p>
<input type="submit" value="Wyślij Dane">
</form>
config.php
Kod
<?
$tytul=$_POST['tytul'];
$opis=$_POST['opis'];
$styl=$_POST['styl'];
$autor=$_POST['autor'];
?>
$tytul=$_POST['tytul'];
$opis=$_POST['opis'];
$styl=$_POST['styl'];
$autor=$_POST['autor'];
?>
I mam pytanie jak zrobić takie coś ze jak wpisze coś do formularza to się zmieni to co jest w zmiennej