saving a value in database
-
Hello
I am trying to save a link in option table , the update is working fine but it is adding a slash(/) in my linkthis is my link
$mynotifylink=str_replace(ABSPATH, trailingslashit(get_option('siteurl')), dirname(__FILE__)).'/paypal.php';the output of $mynotifylink is
D:\wamp\www\bb2ctest\wp-content\plugins\donate-plus/paypal.phpthis is my input field from form
<input type="text" name="mynotifylink" id="mynotifylink" value="<?php $mynotifylink; ?>" />this is how I am updating
$update = get_option( 'DonatePlus' ); $update["mynotifylink"] = $_POST['mynotifylink']; update_option( 'DonatePlus', $update );this is how I am calling in template
<?php echo $dplus['mynotifylink'] ; ?>When I am saving the link from admin panel and printing the same link in template i am receiving this value
D:\\wamp\\www\\bb2ctest\\wp-content\\plugins\\donate-plus/paypal.phpthank you in advance
The topic ‘saving a value in database’ is closed to new replies.