What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-06 16:54:23
add_meta_box
/** * Calls the class on the post edit screen. */ function call_someClass() { new someClass(); } if ( is_admin() ) { add_action( 'load-post.php', 'call_someClass' )... Add solution -
Other 2021-11-06 12:09:08
mysqli_query print result
if (isset($_POST['0'])) { $sql = "SELECT email FROM CommercialEmails WHERE articleid = '$_POST[article]' AND dripid = 1 AND sent='a'"; $resultsd1 = mysqli_query($conn, $sql); while ($row = mysqli_fetch_assoc($resultsd1)) { echo $row['em... Add solution -
Other 2021-11-05 20:06:13
Unique Field – Prevent Contact form 7 Duplicate Submissions
function is_already_submitted($formPostId, $fieldName, $fieldValue) { global $wpdb; /*We make a select in the table where the contacts are recorded, checking if the email informed already exists on today's date */ $entry = $wpdb->get_res... Add solution -
PHP 2021-11-05 19:20:22
Show Custom Input Field @ WooCommerce Single Product Page
/** * @snippet Add input field to products - WooCommerce * @how-to Get CustomizeWoo.com FREE * @author Rodolfo Melogl... Add solution -
PHP 2021-11-04 20:31:15
PHP + curl, HTTP POST sample code?
$post = [ 'teste' => $_POST['teste'] ]; httpPost('url.com', $post); // function function httpPost($url, $data) { $curl = curl_init($url); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $data); curl_set... Add solution -
PHP 2021-11-04 12:03:15
send email when form is submitted php
<?php if(isset($_POST['submit'])){ $to = "[email protected]"; // this is your Email address $from = $_POST['email']; // this is the sender's Email address $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; ... Add solution -
PHP 2021-11-03 15:36:14
PHPMailer
<?php $to = $_POST['email']; $subject = "Email Subject"; $message = 'Dear '.$_POST['name'].',<br>'; $message .= "We welcome you to be part of family<br><br>"; $message .= "Regards,<br>"; // Always... Add solution -
PHP 2021-11-02 21:10:07
woocommerce add custom field data to cart page
add_filter( "woocommerce_add_cart_item_data", "cs_add_cart_item_data", 10,2 ); function cs_add_cart_item_data( $cart_item, $product_id ){ /* Custom Field name="" attr */ if ( isset($_POST['custom_field_name']) ) { ... Add solution