Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Insert Data</title>
- </head>
- <body>
- <center>
- <h2> Insert Your Daily Taks </h2>
- <?php
- $con = mysqli_connect("localhost","phpmyadmin","yaros8");
- if(!$con)
- {
- echo 'Connection to Server';
- }
- if(!mysqli_select_db($con,'Yaros'))
- {
- echo 'Database Not Selected';
- }
- $name = $_POST['Mytask'];
- $sql = "INSERT INTO Tasks (TASK) VALUES ('$name')";
- if(!mysqli_query($con,$sql))
- {
- echo 'not inserted';
- }
- ?>
- <form action="Test.php" method="post">
- New Task : <input type="text" name="Mytask">
- <br>
- <input type="submit" value="Create">
- </form>
- </center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement