Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6027815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:38:51+00:00 2026-05-23T04:38:51+00:00

Controller function delete_payment($payment_id) { $this->sale_lib->delete_payment($payment_id); $this->_reload(); } View <?php echo anchor(sales/delete_payment/$payment_id,'[‘.$this->lang->line(‘common_delete’).’]’);?> It is possible

  • 0

Controller

function delete_payment($payment_id)
{
    $this->sale_lib->delete_payment($payment_id);
    $this->_reload();
}

View

   <?php echo anchor("sales/delete_payment/$payment_id",'['.$this->lang->line('common_delete').']');?>

It is possible for $payment_id to be something like “Gift Card:1” or “Gift Card:12345983984334”

When it is Gift Card:1 the url is automatically decoded and the delete function works, when it is a longer string such as Gift Card:12345983984334″ the url is NOT decoded.

URLS are:

http://localhost/index.php/sales/delete_payment/Gift%20Card:1

http://localhost/index.php/sales/delete_payment/Gift%20Card:12345983984334

First one works, second one doesn’t

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:38:52+00:00Added an answer on May 23, 2026 at 4:38 am

    Actually, I just tried to replicate your situation on my local machine (WAMP on Windows 7) and you’re right. I tried on all major browsers (FF4,IE9,Chrome) and saw no differences.

    Although this doesn’t really answers your question, you can always rig a workaround like this with php function rawurldecode:

    function delete_payment($payment_id)
    {
        $decoded_id = rawurldecode($payment_id);
        $this->sale_lib->delete_payment($decoded_id);
        $this->_reload();
    }
    

    In this way you’ll have your ‘id’ in the form Gift Card:123456789 (I tried with different lenghts and alwyas worked), ready for your model.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<?php class Email extends Controller { function Email() { parent::Controller(); $this->load->library('email'); } function index()
I want to call a controller function from a view. Is that possible in
I use the following the jquery statements to call my php controller function, it
I have this function on my controller (Im using CodeIgniter) that reads the database,
What's wrong with this function: function() { $.get('/controller/action', function(data) { $('#temporaryPhotos').text(data); } ); return
I have a simple unsubscribe function in my Unsubscribed controller. if ($this->Unsubscribe->save($this->data['Unsubscribes'])) { //
My Zend controller is like below: public function deleteAction() { $this->_helper->layout->disableLayout(); $id = (int)$this->_request->getPost('id');
m developing rest api by zf. this is my user controller. <?php class UserController
Check this: function beforeFilter() { $this->Auth->authorize = 'controller'; $this->Auth->allow('delete'); } function isAuthorized() { if
I'm running the CodeIgniter platform, which uses .htaccess to accept URLs like http://www.mysite.com/controller/function/argument I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.