Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta charset="utf-8">
- </head>
- <body>
- <form action="index.php" method="post">
- Podaj nazwe kolumny:
- <input type="text" name="kolumna"><br>
- <input type="submit" value="dodaj kolumne">
- </form>
- <?php
- if($_SERVER["REQUEST_METHOD"]=="POST"){
- $kolumna=$_POST['kolumna'];
- echo "dodano kolumne ".$kolumna;
- $polaczenie=mysqli_connect('localhost','root','','filmoteka');
- $sql="alter table filmy add column ".$kolumna." text ";
- if(mysqli_query($polaczenie, $sql)){
- echo "<br>Dodano kolumne";
- }
- else{
- echo "<br> bÅÄ d".$sql;
- }
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement