// Using require
const hljs = require('highlight.js/lib/core');
// Load any languages you need
hljs.registerLanguage('javascript', require('highlight.js/lib/languages/javascript'));
public class Testing {
public Testing() {
}
public void Method() {
/* Another Comment
on multiple lines */
int x = 9;
}
}
Write a Program to calculate Two Number
// Start Writing Codes Here
<?php
// Check if the user is logged in and get the user's ID
// Replace this with your actual user authentication code
// Get the product ID (replace with your actual method)
$product_id = 123;
// Query the database to check if the product is in the wishlist
$user_id = 1; // Replace with the actual user's ID
$query = "SELECT COUNT(*) AS count FROM wishlist WHERE user_id = $user_id AND product_id = $product_id";
$result = mysqli_query($conn, $query);
$row = mysqli_fetch_assoc($result);
if ($row['count'] > 0) {
// Product is in the wishlist
echo "active"; // Return a response to the JavaScript
} else {
// Product is not in the wishlist
echo "inactive"; // Return a response to the JavaScript
}
?>