Guest User

Untitled

a guest
May 20th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. <?php
  2.  
  3. $host = ($_POST['host']);
  4. $login = ($_POST['login']);
  5. $passwd = ($_POST['passwd']);
  6. $database = ($_POST['database']);
  7.  
  8. echo '<form action="" method="post">
  9. Nazwa Hosta: <input type="text" name="host" /><br />
  10. Login Bazy Danych: <input type="text" name="login" /><br />
  11. Hasło Bazy Danych: <input type="text" name="passwd" /><br />
  12. Nazwa Bazy Danych: <input type="text" name="database" /><br />
  13. <input type="submit" value="Install" />
  14. </form>';
  15. ?>
  16. <?php
  17. $sql = mysql_connect ($host, $login, $passwd);
  18. mysql_select_db("$database");
  19. $comments = "CREATE TABLE Comments (id char(3) NOT NULL, name char(30), date char(10), mail char(10), wiadomosc char(100), PRIMARY KEY(id))";
  20. $wykonaj=mysql_query($comments);
  21. mysql_close($sql);
  22. ?>
Add Comment
Please, Sign In to add comment