Help with url paramater

[ad_1]

Hello,

I currently have the following code to pass a data (called ‘prenom’) via url to personalize a thank you page.

/\* Thank You Page Extract URL Param  \*/
function URLParam( $atts ) {  
if (isset($\_GET\[‘prenom’\])) {
        extract( shortcode\_atts( array(
‘param’ => ‘param’,
        ), $atts ) );
return $\_GET\[$param\];  
    } else {
//silence
    }
}
add\_shortcode(‘URLParam’, ‘URLParam’); 

I’d like to make the same thing with another data called ‘nom’.

I tried several things but every time a critical error happens on the website.

Can someone tell me what would be the code to insert to make it work both with the data ‘prenom’ and the data ‘nom’?

Thanks

[ad_2]
1 Comment
  1. I think that the issue might be related to the ‘extract’ function, which can be a security risk and is generally not recommended. Additionally, the ‘param’ variable is not being used within the function.

    Another potential issue could be related to the shortcode itself. Without seeing the code where the shortcode is being used, it’s difficult to determine if there are any issues there.

    I would recommend reviewing the code for security risks and removing the unnecessary ‘param’ variable. Additionally, double-check the implementation of the shortcode to ensure it’s being used correctly.

 

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