AKASH2001 Posted September 15, 2022 Share Posted September 15, 2022 <?php $username="root"; $password=""; $server='localhost'; $db='crudyoutube'; $con=mysqli_connect($server,$username,$password,$db); if($con){ echo "Connection Successfull"; ?> <script> alert("ok"); </script> <?php } else{ die("no connection" . mysqli_connect_err()); } ?> Quote Link to comment https://forums.phpfreaks.com/topic/315333-why-my-data-was-not-uploaded-in-the-mysql-databaseconnectionphp/ Share on other sites More sharing options...
AKASH2001 Posted September 15, 2022 Author Share Posted September 15, 2022 (edited) (index.html) <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .main { width: 900px; height: 500px; border-top: 5px solid black; border-bottom: 5px solid green; border-left: 5px solid red; border-right: 5px solid blue; transform: translate(300px, 250px); padding-left: 2px; margin-right: 16px; margin-bottom: 5px; text-shadow: 1px 0px 10px green; } .text { text-align: center; margin-top: 40px; font-size: 40px; } form { text-align: center; } b { font-family: Arial, sans-serif; font-size: 30px; padding-left: 22%; padding-top: 2%; } input { font-family: Arial, sans-serif; border-radius: 8px; height: 30px; width: 150px; padding: 5px 5px 5px 10px; } textarea { border-radius: 25px; } #btn { border-radius: 25px; background-color: rgb(9, 44, 243); width: 150px; height: 40px; font-size: 15px; cursor: pointer; } </style> </head> <body> <div class="main"> <h2><b>Apply For Web Developer Post</b></h2><br> <form action="connection.php" method="post"> <input type="text" class="fname" placeholder="Enter your name*" name="firstname"> <input type="text" class="fname" placeholder="Enter your qualification*" name="quali"><br> <input type="text" class="fname" placeholder="mobile number*" name="moblie"> <input type="text" class="fname" placeholder="email Id*" name="email"><br> <select id="Developer" name="developer"> <option value="Web Developer">Web Developer</option> <option value="Android Developer">Android Developer</option> <option value="ios Developer">ios Developer</option> </select> <input type="text" class="fname" placeholder="Any References" name="ref"><br> <textarea name="text" id="tid" cols="30" rows="10" placeholder="Any Achievements*"></textarea><br><br> <input type="submit" class="btnres" id="btn" name="submit" value"Register"/> </form> </div> </body> </html> Edited September 15, 2022 by Barand code tags added Quote Link to comment https://forums.phpfreaks.com/topic/315333-why-my-data-was-not-uploaded-in-the-mysql-databaseconnectionphp/#findComment-1600588 Share on other sites More sharing options...
ginerjm Posted September 15, 2022 Share Posted September 15, 2022 I see a connection being made and I see some html and css. I don't see anything else. So - what is your question? Quote Link to comment https://forums.phpfreaks.com/topic/315333-why-my-data-was-not-uploaded-in-the-mysql-databaseconnectionphp/#findComment-1600589 Share on other sites More sharing options...
Barand Posted September 15, 2022 Share Posted September 15, 2022 What we don't see are check to see if data was posted to the page data validation an insert query to write the posted data to the database (When posting code in these forums, use the code button "<>" in the toolbar.) Quote Link to comment https://forums.phpfreaks.com/topic/315333-why-my-data-was-not-uploaded-in-the-mysql-databaseconnectionphp/#findComment-1600590 Share on other sites More sharing options...
dodgeitorelse3 Posted September 15, 2022 Share Posted September 15, 2022 Your form is posting to connection.php I assume that page is your first code with connection info. Where is it supposed to work with database? Quote Link to comment https://forums.phpfreaks.com/topic/315333-why-my-data-was-not-uploaded-in-the-mysql-databaseconnectionphp/#findComment-1600591 Share on other sites More sharing options...
Barand Posted September 15, 2022 Share Posted September 15, 2022 An interesting concept though. An input form pointed at a DB connection, at which point the DBAI interface takes over, processes the data, and updates the required tables for you. (MySQL v9.0 perhaps?) Quote Link to comment https://forums.phpfreaks.com/topic/315333-why-my-data-was-not-uploaded-in-the-mysql-databaseconnectionphp/#findComment-1600592 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.