Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $pageTitle = $_POST['pageTitle'];
- $myFile = ($pageTitle . ".html");
- $fh = fopen($myFile, 'w') or die("can't open file");
- $stringData = "<h1>HELL YES!</h1><p>if this works i'll be so happy and i will have a coffee</p>";
- fwrite($fh, $stringData);
- fclose($fh);
- ?>
- <html><body>
- <h1>OK here's my html maker</h1>
- <form action="makesomehtml.php" method="post">
- What do we call it?: <input name="pageTitle" type="text" />
- <input type="submit" />
- </form>
- </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement