possible?
is it possible to put the results in a textfield to be save in separate database table?
CREATE TABLE `tutorial` ( `tutorialid` INT(11) NOT NULL AUTO_INCREMENT, `title` VARCHAR(150) NOT NULL, `link` VARCHAR(150) NOT NULL, PRIMARY KEY(`tutorialid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `tutorial` (`tutorialid`, `title`, `link`) VALUES (1, 'Submit Form using AJAX in PHP/MySQLi', 'https://www.sourcecodester.com/tutorials/php/11649/submit-form-using-ajax-phpmysqli.html'), (2, 'Image Upload using AJAX in PHP/MySQLi', 'https://www.sourcecodester.com/tutorials/php/11648/image-upload-using-ajax-phpmysqli.html'), (3, 'Creating an Iterator for While Loop Forms in PHP/MySQLi', 'https://www.sourcecodester.com/php/11643/creating-iterator-while-loop-forms-phpmysqli.html'), (4, 'Drag, Drop and Insert into Database using AJAX/jQuery in PHP', 'https://www.sourcecodester.com/tutorials/php/11641/drag-drop-and-insert-database-using-ajaxjquery-php.html'), (5, 'Simple POS and Inventory System', 'https://www.sourcecodester.com/php/11625/simple-pos-and-inventory-system.html'), (6, 'Performance Indicator System', 'https://www.sourcecodester.com/php/11638/performance-indicator-system.html'), (7, 'Simple Chat System', 'https://www.sourcecodester.com/php/11610/simple-chat-system.html'), (8, 'Uploading Multiple Files into MySQL Database using PHP/MySQLi', 'https://www.sourcecodester.com/tutorials/php/11634/uploading-multiple-files-mysql-database-using-phpmysqli.html'), (9, 'Deleting Multiple Rows using Checkbox in PHP/MySQLi', 'https://www.sourcecodester.com/tutorials/php/11631/deleting-multiple-rows-using-checkbox-phpmysqli.html'), (10, 'PHP/MySQLi CRUD Operation with Bootstrap/Modal', 'https://www.sourcecodester.com/php/11629/phpmysqli-crud-operation-bootstrapmodal.html'), (11, 'PHP Passing Value to Modal using jQuery', 'https://www.sourcecodester.com/tutorials/php/11627/php-passing-value-modal-using-jquery.html'), (12, 'How to Add Class to a Div using JQuery', 'https://www.sourcecodester.com/tutorials/javascript/11619/how-add-class-div-using-jquery.html'), (13, 'How to Limit Number of Items per Row in While Loop using PHP/MySQLi', 'https://www.sourcecodester.com/tutorials/php/11618/how-limit-number-items-row-while-loop-using-phpmysqli.html'), (14, 'PHP Prevent the Return to Login Page/Disable Back after Login', 'https://www.sourcecodester.com/tutorials/php/11614/php-prevent-return-login-pagedisable-back-after-login.html');
<?php if (!$conn) { } ?>
<!DOCTYPE html> <html> <head> <title>Select from Database Randomly (Random Query) using PHP/MySQLi</title> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> </head> <body> <div class="container"> <div class="row" style="margin-top:30px;"> <form method="POST"> <input type="submit" name="refresh" value="Refresh" class="btn btn-primary"> </form> </div> <div class="row" style="margin-top:10px;"> <table class="table table-bordered table-striped"> <thead> <th>ID</th> <th>Title</th> <th>Link</th> </thead> <tbody> <?php //use this if you have small number of data include('conn.php'); //for large volume of data //include('conn.php'); //$q=mysqli_query($conn,"select * from tutorial"); //$num=mysqli_num_rows($q); //$limit=10; //limit //$random=$limit/$num; //$query=mysqli_query($conn,"select * from tutorial order by rand()<=$random limit 10"); ?> <tr> <td><?php echo $row['tutorialid']; ?></td> <td><?php echo $row['title']; ?></td> <td><?php echo $row['link']; ?></td> </tr> <?php } ?> </tbody> </table> </div> </div> </body> </html>