I’m pretty sure you don’t quote the $variable at all when doing a query with wpdb.
So 'association_first_name' => '$legalname' would be 'association_first_name' => $legalname
But that might not solve all your problems.
Related Posts:
- How to correctly submit a search form and display the result in an independent page
- How to create and work with custom data / tables (i.e., for arbitrary data)?
- Submitting a form, using Ajax, to run a SQL Select query based on user input from the form
- form $_post action value gets truncated after it passes through two forms
- WPDB secure custom form
- Adding data to custom wordpress database table
- Using Ajax to submit a form, and run a SQL Select query based on user input from the form
- Insert data from form to database
- Passed variable gets undefined variable error on insert on next page
- How to set up an auto delete post?
- How to pass username into form that sends data to database
- Custom form that stores data in mysql database
- Putting form result in my database
- Can’t insert into a database wordpress
- Database query works fine outside WordPress
- Show success or error messages in Ajax response to WordPress custom registration form
- Using $wpdb (WPDB class) ‘replace’ with multiple WHERE criteria problem
- Styling my own password protected page, how to deal with wrong password?
- Contact form won’t submit
- wp_mail file attachment not being placed in upload folder?
- $wpdb->wp_users returning empty value for
- Search Query: how to construct a search string from two select elements?
- Large Woocommerce Site (83,000 items), What Can I Do? [closed]
- Login to wordpress by clicking a link and specifying usernaname and password in url
- $wpdb->insert() does not Insert record in a table
- Using custom tables for old posts
- Databases – Submitting data from inputs to database [closed]
- Help with a $wpdb MySQL Query
- How to show a ‘correct’ message after submit a form?
- db converts decimal number wrong
- WordPress SQL injection
- Form Security: nonce vs. jQuery
- WordPress admin-ajax.php 400 bad request
- Not connecting to database in file with multiple MySQL connections
- Way to bulk make all my tags lowercase?
- $Wpdb post meta query is not working with mutliple meta keys and values? [closed]
- How i can obtain all the post meta for a specific post as an array?
- multiple where condition in result query
- Ajax contact form return 0
- Grouping posts by a custom meta value
- Trying do build a contact form
- “operation successful” message
- User register hook is not working in woocomerce register form
- Search WordPress using static html page
- Multiple meta_key in one global $wpdb;
- Custom array from a query only write the last row of the query
- WordPress member notification
- Can’t Query Custom Table Using $wpdb Method
- Moving wordpress site from localhost to live server using GoDaddy cPanel
- How does WP work in conjunction with a web server?
- WordPress Block developer from exporting Database via PHP
- How to execute html code inside php?
- $wpdb returns duplicate posts
- Update postmeta after theme switch
- Mixing variables into an array when inserting values
- Location of core code for database connection and get_header
- wpdb prepare insert table doesn’t work
- Should I use WordPress to skin a database website?
- php include not working in custom page
- How do I display offsite database info on my wordpress site?
- Creating Database Table vs. Adding MetaData to Post & User
- How to put a form with php code into a variable or shortcode?
- Make a database query using WordPress
- Force Users To Relogin
- Can a page contain php code?
- WordPress and MySQL: trying to print data using PHP from user_meta custom field data
- How to send form data from WordPress (Meta Box) to an OData service?
- WordPress Custom SQL Table with UserID Filter for results
- Most commented posts by time period (last 12h, last 24h and etc)
- Use $wpdb or other PHP script method to find/replace in WP database
- What is the alternative code to if (isset ($_POST) && !empty ($_POST) to avoid warnings?
- email alert for product availability
- WordPress shortcode returns the data before
- How can I add a new row in a separate database when someone registers via WordPress?
- Shortcode to embed Edit Account form not working
- Issue with fetching mysql data and displaying results via shortcode in webpage
- Form Submission Not Working In Custom Theme
- Basic wpdb update question
- Hide posts if user is added to it WP_query
- Capture form data in one function and use it in another function (same file)
- I can’t update my data through $wpdb
- A $_POST should occur when submit form but is not?
- Custom route and query
- Output: “Array”
- How to unserialize data from MySQL
- How to use mysql LIKE with wpdb?
- How to display success message correctly and delete it when the page is refreshed
- Pull MySQL data from multiple tables and merge into 1 PHP array
- Using admin-post.php for admin form but it directs me to admin-post.php white screen
- Why does my user not get added to the database on custom registration?
- How to add post meta in while loop?
- WordPress WP_Query without query GET parameters
- How do I prepare strings for insertions as values into a MySQL table?
- Known Issues in WordPress When Upgrading PHP to ver 7
- Using CFDB7 vs Custom MySQL Database [closed]
- How to set cookies
- How to use AJAX in WordPress in MYSQL query?
- add category to posts with tag wordpress
- PHP Contact form
- How can I Use 2 databases with one WordPress install