I have updated your code here. so use this below code. you have forgot close this
)in this line like this while($row=mysql_fetch_object($query))
<tr>
<?php include('sql_connect.php'); ?>
<?php
$sql="select * from hp";
$query=mysql_query($sql);
if(mysql_num_rows($query)>0)
{
$i=1;
while ($row=mysql_fetch_object($query)){ ?>
<th scope="row"><input type="checkbox" /></th>
<td class="tm-product-name"><?php echo $hp_model; ?>
</td>
<td><?php echo $hp_type; ?></td>
<td><?php echo $hp_colour; ?></td>
<td><?php echo $hp_ds; ?></td>
<td><?php echo $hp_price; ?></td>
<?php } } ?>
<td><a href="#" class="tm-product-delete-link"> <i class="far fa-trash-alt tm-product-delete-icon"></i> </a></td>
</tr>
Related Posts:
- Deprecated: mysql_connect()
- dbDelta support for FOREIGN KEY
- is it possible to run some php code within a wordpress page?
- How to correctly submit a search form and display the result in an independent page
- Query both first_name and last_name from wp_usermeta at the same time
- How to use update and delete query in wordpress
- How to implement WP_List_Table? WP_List_Table giving array instead of a value in listing table
- Does WordPress cache get_user_meta() results?
- simple wordpress ajax plugin not working when not logged in
- Using Echo in ShortCode – Stuck
- MySQL query performed 4 times inside loop
- Show only one post for each author ( Page loads too slow )
- Would manually deleting the dumping data fix a “#1062 – Duplicate entry ‘1’ for key ‘PRIMARY'” phpMyAdmin error?
- Modern Tribe Calendar wp-query with meta query not working at all
- WP database error for comments_popup_link()
- No wp-config.php file on local install of wordpress – site still displays
- Use ajax to update_post_meta
- Insert all post IDs in new database table
- register_activation_hook isn’t adding table to DB
- Is the outdated PHP mysql extension a requirement for WordPress 4.6?
- What SQL / WordPress queries would need a nonce?
- Different database query in function.php using mysqli
- Converting MYSQL to WordPress $WPDB
- Why is variable not working on custom sql query using wpdb?
- Get WooCommerce product details and transfer them to a custom DB table
- How can I export posts with featured images, without download them
- How to securely provide a $_POST var in WP_Query with PHP 7?
- Create WP_Query to search for posts by their categories or their parent/child categories
- What is a valid parent for get_terms()?
- WSoD being caused by this piece of code
- How to display data from custom table in wordpress phpmyadmin
- Calculating a large number of MYSQL queries as customshort codes, slow
- Update results, Before deleting the related category [closed]
- Sum the total amount of a specific product purchased per user and display in table
- Replacing mysql_escape_string in a custom plugin when moving to PHP7
- Weird 404 URL Problem – domain name being placed at end of urls
- database sent to a JSON file
- inserting a post from an extern php file but post content doesn’t show on wp site
- $wpdb->insert() does not Insert record in a table
- WordPress SQL injection
- multiple where condition in result query
- Grouping posts by a custom meta value
- Mixing variables into an array when inserting values
- wpdb prepare insert table doesn’t work
- Should I use WordPress to skin a database website?
- WordPress Custom SQL Table with UserID Filter for results
- How can I add a new row in a separate database when someone registers via WordPress?
- I can’t update my data through $wpdb
- Output: “Array”
- How to use mysql LIKE with wpdb?
- How to use AJAX in WordPress in MYSQL query?
- Use variable in SQL statement
- Live search from database table
- Processing ajax call to php to insert into mysql database
- form $_post action value gets truncated after it passes through two forms
- phpMyAdmin error #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’
- How to create Loop code for Menu using WordPress?
- WordPress Custom Query: Combining Two Functions
- MySQL Query Returns Array () In Shortcode
- How to WP_Query posts order by parent title?
- Passing in MySQL prepare statement parameter separately throwing error
- Convert a column of a table containing an Array as response in HTML
- Database SQL query error
- Error establishing a database connection (Set-up locally)
- MYSQL TIMESTAMP when adding DATE_FORMAT then the output is blank, PHP conflict?
- Updated Php version from 5.4 to 7.2 and getting “PHP installation missing the MySQL extension needed by WordPress”
- how to get data from two different table from wordpress database
- Passing Current User ID into SQL statement
- How to optimize and reduce excessive database queries
- How to insert multiple rows and columns in database using array
- Store GA Client ID in User DB
- PHP 7.2.18 | Your PHP installation appears to be missing the MySQL extension which is required by WordPress
- Error inserting into custom table – Object of class wpdb could not be converted to string [closed]
- Windows Setup: Error establishing a database connection
- Need help with format of nested array in MySQL
- WAMP SERVER Command Prompt SET PATH=%PATH%
- Inserting other fields to existing registration form in a WordPress theme
- Advanced WordPress SQL Query
- Splitting table data to pages with numbers
- How can get all users by current user meta (array)?
- Site doesnt work once PHP changed to 7.1
- Add two or multiple functions in WordPress Post or Page
- How to detect if a revision was made by woocommerce or wordpress?
- WordPress WPDB::insert 13th param is always blank (only if format)
- Ajax not updating to database
- can’t delete a row from post_meta table
- MySQL query in WordPress with AJAX
- Processing forms with php to wordpress database
- How to connect database table to each registered wordpress user.
- retrieve wordpress post-meta using php not wordpress functions
- Splash pages on a high traffic site
- Using the same shortcode to show any table from the database
- Predefine Magazine Style Layouts
- I am unable to fetch json data from wp_db
- Submit cf7 form to cfdb as pdf/BLOB [closed]
- How to send push notification in android using php? [closed]
- How to set variable to specific field when querying
- How to get a database field value from a WordPress table? [closed]
- Getting invalid user ID error when creating a new user with wp_insert_user
- Custom form that stores data in mysql database