Title: saving a value in database
Last modified: August 19, 2016

---

# saving a value in database

 *  [Alvaro](https://wordpress.org/support/users/nicardo/)
 * (@nicardo)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/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 link
 * this 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.php**
 * this 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.php **
 * thank you in advance

The topic ‘saving a value in database’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 0 replies
 * 1 participant
 * Last reply from: [Alvaro](https://wordpress.org/support/users/nicardo/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/saving-a-value-in-database/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
