Sending Form data as Attachment
Sending Form data as Attachment
Sending Form data as Attachment
$wpdb has an insert method, so you can try the following: $table=”wp_email_subscribers”; $data = array( ‘first_name’ => $firstname, ‘last_name’ => $lastname, ’email’=> $email , ‘gdpr_consent’=>$gdprconsent ); $format = array(‘%s’,’%s’, ‘%s’, ‘%s’); $wpdb->insert($table,$data,$format); var_dump($wpdb->insert_id);
First of all don’t ever edit core files. Your changes will be lost on update. WordPress has a great way to expand as needed called Plugin. As you don’t have enough knowledge about how WordPress works I suggest to use this ready made solution to avoid any risk. Here is the link
Would it be an issue of permalink (20) not existing and thus just returning the current page? Yes, it seems that is happened now. Try to change the id fo that permalink to your booking page id. get_permalink( BOOKING_PAGE_ID )
simple fix, changed to: window.location.href = (permalink);
OK, so there are many problems with your code… But I’m pretty sure I know, where the major one lies… But first things first… You add your AJAX callbacks with this code: add_action( ‘wp_ajax_wilcity_handle_review_listing’, ‘address_save_postdata’ ); add_action( ‘wp_ajax_wilcity_handle_review_listing’, ‘address_save_postdata’ ); It doesn’t make sense to add the same function twice. It can be a mistake, … Read more
Pass form inputs to page content
You’re POSTing user_name but in your code you’re checking for register_name, you should instead check $_POST[‘user_name’] instead. You should also be checking to make sure a value is actually being passed as well, this is how I would do it instead (setting unavailable as default): function mpl_check_username() { $response = array( ‘status’ => ‘unavailable’, ‘text’ … Read more
I believe you are trying to achieve “sticky” effect. This might help you do this. My Sticky Sidebar Plugin
If anyone faces the same problem, its easy to display a message with have_posts() <?php if ( have_posts() ) { echo “Events gefunden”; } else { echo “Keine Events gefunden”; } ?>