URL params in SQL query

[ad_1]

Hello @pcescato

Thank you very much for using our plugin.

You can use two recordset fields. The first one reads the URL parameters, and fills a hidden field. The second one uses the hidden field value to get the database records.

Some fields of the form structure would be:

<input type="hidden" name="code">
[cf7-recordset id="recordset_url" type="url-parameters"]
[cf7-link-field recordset="recordset_url" field="code" value="code"]
[cf7-recordset id="mydatas" type="database" query="SELECT id, description FROM {wpdb.prefix}mytable WHERE code={field.code}"]

Best regards.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer