Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Home</title>
- <link rel="stylesheet" type="text/css" href="/css/basic.css">
- </head>
- <body>
- <header>
- <img src="images/header/KBI header.png" alt=""/>
- </header>
- <nav>
- <ul>
- <li> <a href="/index.php">Home</a></li>
- <li><a href="/kbi/articles/articles.php">Articles</a>
- <ul>
- <li><a href="/kbi/articles/new/new.php">News & Updates</a></li>
- <li><a href="/kbi/articles/reviews/reviews.php">Reviews</a></li>
- <li><a href="/kbi/articles/toppicks/toppicks.php">Top Picks</a></li>
- <li><a href="/kbi/articles/vault/thevault.php">Vault</a></li>
- <li><a href="/kbi/articles/myrig.php">My Rig</a></li>
- </ul>
- </li>
- <li><a href="kbi/devices/devices.php">Devices</a>
- <ul>
- <li><a href="/kbi/devices/android/android.php">Android</a></li>
- <li><a href="/kbi/devices/ios/ios.php">IOS</a></li>
- <li><a href="/kbi/devices/windows/windows.php">Windows</a></li>
- <li><a href="/kbi/devices/osx/osx.php">OSX</a></li>
- <li><a href="/kbi/devices/linux/linux.php">Linux</a></li>
- </ul>
- </li>
- <li><a href="/kbi/hardware/hardware.php">Hardware</a>
- <ul>
- <li><a href="/kbi/hardware/desktop/desktop.php">Desktop</a>
- <ul>
- <li><a href="/kbi/hardware/desktop/CPU/cpu.php">CPU's</a></li>
- <li><a href="/kbi/hardware/desktop/Graphics Cards/graphicscards.php">Graphics Cards</a></li>
- <li><a href="/kbi/hardware/desktop/RAM/ram.php">RAM</a></li>
- </ul>
- </li>
- <li><a href="/kbi/hardware/laptops/laptops.php">Laptops</a></li>
- <li><a href="/kbi//hardware/popular/popular.php">Popular</a></li>
- </ul>
- </li>
- <li><a href="/kbi/about/about.php">About</a>
- <ul>
- <li><a href="/kbi/about/contact/contact.php">Contact</a></li>
- <ul>
- <a href="/kbi/articles/myrig.php">My Rig</a>
- </ul>
- </ul>
- </li>
- <li id="user"><a href="/user/user.php">User ID Displays Here</a>
- <ul>
- <li><a href="/user/account.php">Account Settings</a></li>
- <li><a href="/user/payment.php">Payment Settings</a></li>
- <li><a href="/user/subscribe.php">Subscriptions</a></li>
- <li><a href="/user/main_login.php">Login</a></li>
- </ul>
- </li>
- </ul>
- </nav>
- <rnav>
- <h2>User info</h2>
- <p>User post count</p>
- <p>User ratings</p>
- <p>User sites</p>
- <h2>User Threads</h2>
- <p>Recent posts to threads</p>
- <h2>Newest Threads</h2>
- </rnav>
- <main>
- <form action="insert.php" method="post">
- <!-- Method can be set as POST for hiding values in URL-->
- <h2>Form</h2>
- <label>Name:</label>
- <input class="input" name="name" type="text" value="">
- <label>Email:</label>
- <input class="input" name="email" type="text" value="">
- <label>Username:</label>
- <input class="input" name="username" type="text" value="">
- <label>Password:</label>
- <input class="input" name="password" type="text" value="">
- <input class="submit" name="submit" type="submit" value="Insert">
- </form>
- <?php
- //Establishing Connection with Server
- $connection = mysql_connect("localhost", "karsonbe_00", "a3885Z04");
- //Selecting Database from Server
- $db = mysql_select_db("karsonbe_users", "login", $connection);
- if(isset($_POST['submit'])){
- //Fetching variables of the form which travels in URL
- $name = $_POST['name'];
- $email = $_POST['email'];
- $username = $_POST['username'];
- $password = $_POST['password'];
- if($name !=''||$email !=''){
- //Insert Query of SQL
- $query = mysql_query("insert into login(name, email, username, password) values ('$name', '$email', '$username', '$password')");
- echo "<br/><br/><span>Data Inserted successfully...!!</span>";
- }
- else{
- echo "<p>Insertion Failed <br/> Some Fields are Blank....!!</p>";
- }
- }
- //Closing Connection with Server
- mysql_close($connection);
- ?>
- </main>
- <footer>
- <a href="/assessments/teachingpresentation.php">Teaching Presentation</a>
- <a href="/assessments/siteplan.php">Site Plan</a>
- <a href="/cit160/mylife.php">My Life</a>
- </footer>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement