Abdul Waheed Abdul Waheed - 1 month ago 6
PHP Question

How to store defined constant in a variable

This is defined constant in config file.

define(BASE_URL, "http://example.com/lc-latest/");


I want to store in a variable for sending a confirmation email to complete the registration

$website=echo BASE_URL;

Answer

Inline PHP

<a href="<?=BASE_URL;?>confirm.php?accountid=<?=$chk_number;?>">Click here and confirm </a>
Comments