Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. <?php
  2.  
  3. $pageTitle = $_POST['pageTitle'];
  4. $myFile = ($pageTitle . ".html");
  5. $fh = fopen($myFile, 'w') or die("can't open file");
  6. $stringData = "<h1>HELL YES!</h1><p>if this works i'll be so happy and i will have a coffee</p>";
  7. fwrite($fh, $stringData);
  8. fclose($fh);
  9.  
  10. ?>
  11.  
  12. <html><body>
  13. <h1>OK here's my html maker</h1>
  14. <form action="makesomehtml.php" method="post">
  15. What do we call it?: <input name="pageTitle" type="text" />
  16. <input type="submit" />
  17. </form>
  18. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement