PHP: Connect Mysql Database Using PDO

<!– <?php $user=’root’; $pass=’www.cheapglasses123.com’; $dbh = new PDO(‘mysql:host=localhost;dbname=yzmedu’, $user, $pass); ?> –> <?php try { $dbh = new PDO(‘mysql:host=localhost;dbname=yzmedu’, $user, $pass); // var_dump($dbh); foreach($dbh->query(‘SELECT * from message’) as $row) { echo “<pre>”; print_r($row); echo “</pre>”; } $dbh = null; }… Read morePHP: Connect Mysql Database Using PDO

Bootstrap “Read More”

My customer’s glasses shop based on Magento 2.3, using Bootstrap 3 based theme. Here is a method to add “Read More…” at this glasses shop. Here is the basic code: <div> How to buy eyeglasses online? <a class=”hook in” data-toggle=”collapse”… Read moreBootstrap “Read More”

How to add different custom text at different Category of X-cart 4.7?

Edit /skin/reboot/customer/main/subcategories.tpl, add the following codes at the proper place: {if $current_category.categoryid eq “1”} <div class=”details-summary-accordion” itemscope itemtype=”https://schema.org/FAQPage”> <details class=”my-1″ itemscope itemprop=”mainEntity” itemtype=”https://schema.org/Question”> <summary class=”h4 bg-light border rounded px-3 py-2″ itemprop=”name”>How to Order the Best Fashion Safety Glasses?</summary> <div itemscope… Read moreHow to add different custom text at different Category of X-cart 4.7?

How to Set Default Post Title?

Modify the file named functions.php which is under your theme, add the following code at the file: //Default Post Title function my_default_title_filter() { global $post_type; if (‘post’ == $post_type) { return ‘Eyeglasses ‘; } } add_filter(‘default_title’, ‘my_default_title_filter’); Here the default… Read moreHow to Set Default Post Title?