MAMP Setup
Jamroom Developers
Anyone develop on mac?
$_temp = jrCore_db_get_item('xxFoo', $id);
<?php
function myModule_redirect() {
// Retrieve the value of the 'store_url' setting
$myModule_store_url = jrCore_get_setting('myModule', 'store_url');
// Check if the URL is valid before using it
if (filter_var($myModule_store_url, FILTER_VALIDATE_URL) === false) {
// Handle invalid URL (e.g., display an error message)
echo 'Invalid Store URL';
exit();
}
// Redirect to the store URL
header('Location: ' . $myModule_store_url);
exit();
}
<?php
// Redirect to another website
// $redirect_url = 'https://store.mysite.com/login?back=my-account';
$redirect_url = $_conf['myModule_store_url'] ;
header('Location: ' . $redirect_url);
exit(); // Make sure to exit after sending the header to ensure the script stops executing
and i also tried...
$redirect_url = jrCore_get_setting('myModule', 'store_url');
<?php
// Redirect to another website
$redirect_url = 'https://store.mysite.com/login?back=my-account';
header('Location: ' . $redirect_url);
exit(); // Make sure to exit after sending the header to ensure the script stops executing
$_tmp = array(
'name' => 'store_url',
'default' => '',
'type' => 'text',
'validate' => 'url',
'label' => 'Store URL',
'help' => 'Enter the Store URL',
'order' => 1
);
jrCore_register_setting('myModule', $_tmp);