Query Concatenation

In SQL statement use placeholders instead of variable: %s (string) or %d (number). The second argument of prepare() is array of variables to substitute into the placeholders. $skill_select = $wpdb->get_results( $wpdb->prepare(” SELECT skill_name, char_id, um_id, c.class_id FROM `wp_ml_skill_class` sc JOIN `wp_ml_skill` s ON (s.skill_id = sc.skill_id) JOIN `wp_ml_character` c WHERE c.class_id = %d AND c.char_id … Read more

Notice: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’ in ….functions.php on line 73

*Without quotes PHP interprets the REQUEST_URI as a constant** but corrects your typo error if there is no such constant and interprets it as string. When error_reporting includes E_NOTICE, you would probably get an error such as: Notice: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’ in <file path> on line <line number> But if … Read more

Theme causing SSL break on chrome

Google has marked matx.coderpixel.com as a phishing site. That’s not your domain, of course. However you are using resources from that site. Specifically you are using several images from matx.coderpixel.com/wp/wp-content/uploads/2016/04, including android_phone.jpg, cloudy_hill.jpg, desk.jpg, keyboard.jpg, and man_with_ipad.jpg. It is a bad (and unless you have the rights to use these images, illegal) practice to serve … Read more

Parse error: syntax error, unexpected ‘}’ in C:\wamp64\www\Proiect\aplicatie\user_check.php on line 18 [closed]

The semi-colons need to go inside the curly braces, to mark the ends of the array_push() statements: if(empty($username)) { array_push($errors, “Username is required”); } if(empty($email)) { array_push($errors, “Email is required”); } if(empty($password)) { array_push($errors, “Password is required”); } You don’t need semi-colons after the close braces.

Add clickable function in functions.php – parse error [closed]

For clarity’s sake regarding my comments, this is something more akin to what I’m talking about… // plugins/wpse392844/wpse392844.php function wpse392844_enqueue_assets() { wp_enqueue_script( ‘wpse392844-frontend’, plugins_url( ‘assets/js/frontend.js’, __FILE__ ) ); } add_action( ‘wp_enqueue_scripts’, ‘wpse392844_enqueue_assets’ ); // plugins/wpse392844/assets/js/frontend.js function thfull() { document.getElementById(‘thf’).style.maxHeight=”1000px”; } (we’re defining the thfull() function in JavaScript rather than PHP such that the browser will … Read more

Fatal error with Ultimate Coupon plugin

Both plugins – Premium Coupon Plugin and Ultimate Coupon – declare the poorly named function like_content(). Disable the other plugin before you activate this one. And tell the developer they should prefix their functions.

Parse error: syntax error, unexpected T_FUNCTION

That is called an Anonymous Function and is only supported in later versions of PHP, specifically 5.3.0 and later. If I were a betting man I would say your server has an earlier version of PHP. Try this instead: /*Add meta boxes to contact page*/ function contact_metaboxes( \WP_Post $post ) { global $post; if( ! … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)