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]
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.