|  PHP beginner |  | 1ste pagina: 
 
    
    
        
            
                <html>
<head>
<title>Untitled</title>
</head>
<body>
<form action="2depagina.php" method="post">
Naam: <input type="text" name="naam"><br>
IP: <input type="text" name="ip">
<input type="submit" value="edit">
</form>
</body>
</html> <html><head><title>Untitled</title></head><body><form action="2depagina.php" method="post">Naam: <input type="text" name="naam"><br>IP: <input type="text" name="ip"><input type="submit" value="edit"></form></body></html>
   2de pagina:
 
 
    
    
        
            
                <?php
$content="name \""$_POST['naam']"\"\nserverpassword \""$_POST['ip']"\"";
//zet wat het moet worden in een variabele, \n is nieuwe regel
$fp=fopen("test.cfg",w+); //open het bestand
fputs($fp,$content); //schrijf erin
fclose($fp); //sluit het bestand
?>
<html>
<head>
<title>Untitled</title>
</head>
<body>
de configuratie is bijgewerkt
</body>
</html> <?php$content="name \""$_POST['naam']"\"\nserverpassword \""$_POST['ip']"\"";//zet wat het moet worden in een variabele, \n is nieuwe regel $fp=fopen("test.cfg",w+); //open het bestandfputs($fp,$content); //schrijf erinfclose($fp); //sluit het bestand?><html><head><title>Untitled</title></head><body>de configuratie is bijgewerkt</body></html>
   |