Search found 6 matches

by indhosting
Mon Jun 10, 2019 9:47 pm
Forum: Web Design and Development
Topic: Click HTML link and delete data from MySQL database using PHP
Replies: 4
Views: 1577
India

Re: Click HTML link and delete data from MySQL database using PHP

i have an admin section on my website where i can view all the information in a MySQL table that stores login info (name, password, email etc.)! I want a link at the end of the table for each row, where i can click delete and the row will be deleted! I understand the SELECT/DELETE MySQL commands, b...
by indhosting
Sat Jan 26, 2019 2:00 pm
Forum: Web Design and Development
Topic: Click HTML link and delete data from MySQL database using PHP
Replies: 4
Views: 1577
India

Re: Click HTML link and delete data from MySQL database using PHP

you can use something like below <a href="page.php?action=delete&id=$id">Delete</a> <?php //database connection code goes here if(($_GET['action'] == 'delete') && isset($_GET['id'])) { $sql = "DELETE FROM webhowned WHERE OrderID = '".($_GET["id"])."'"; if(mysqli_query($con,$sql)) { echo 'Record dele...
by indhosting
Sat Jan 26, 2019 1:38 pm
Forum: Web Design and Development
Topic: Show confirmation box after clicking a HTML link <a>
Replies: 2
Views: 1198
India

Re: Pop up to confirm when clicking a HTML link

here are different types of prompting it and you can use that best suits you Inline Code: <a href="page.php?action=delete&id=$id" onclick="return confirm('Are you sure?')">Delete</a> Event Listener: <a href="page.php?action=delete&id=$id" class="alert">Delete</a> <script type="text/javascript"> var ...
by indhosting
Sat Jan 19, 2019 4:22 pm
Forum: Web Design and Development
Topic: Get data from MySQL database using id in url
Replies: 3
Views: 1813
India

Re: Get data from MySQL database using id in url

<?php error_reporting(E_ALL); ini_set('display_errors', 1); $servername = "localhost"; $username = "xxxx"; $password = "xxxxxx"; $db_name = "xxxxxxxxx"; // Create connection $conn = new mysqli($servername, $username, $password, $db_name); // Check connection if ($conn->connect_error){ die("Connecti...
by indhosting
Fri Jan 18, 2019 9:18 pm
Forum: Web Design and Development
Topic: Connect to MySQL database and fetch data from MySQL table and display in html
Replies: 1
Views: 1077
India

Re: Connect to MySQL database and fetch data from MySQL table and display in html

<?php include 'header.php'; $con = mysqli_connect( "xyz.com","nano","itsacar","my_db" ); $sql = "SELECT * FROM cars"; $result = $con->query($sql); echo "<table border='1'> <tr> <th>Name</th> <th>Model</th> </tr>"; while($array= mysqli_fetch_array($result)) { echo "<tr>"; echo "<td>" . $array['Name'...
by indhosting
Fri Jan 18, 2019 8:58 pm
Forum: Web Design and Development
Topic: Country and State Dropdown List HTML & JS
Replies: 1
Views: 1213
India

Re: Country and State Dropdown List HTML & JS

You can find the solution in the attachment below and follow HTML example from file "example-default.html". Usage: <html> <head> <meta charset="UTF-8"> <!-- link for jquery style --> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script src="//ajax.googleapis.co...