0

current URL: http://localhost/expressfly/betaversion1/index.php/users/pricing/8/No

when the form is submitted it is supposed to get redirected to a different URL but the URL passed in the form action is getting concatenated to the current URL.

Please note: Form is written in the controller

<form id='provider_pay_form' class='form-horizontal' action='index.php/users/reduce_amount/$currentSegment2' enctype='multipart/form-data' method='post' onsubmit='paynow();'>
7
  • <form id='provider_pay_form' class='form-horizontal' action='index.php/users/reduce_amount/$currentSegment2' enctype='multipart/form-data' method='post' onsubmit='paynow();'> Commented May 3, 2017 at 5:39
  • give there full path or try ./index.php... Commented May 3, 2017 at 5:42
  • onsubmit you are directiing to paynow() show your script written in paynow(); or try after removing it Commented May 3, 2017 at 5:45
  • stackoverflow.com/questions/15737838/… Commented May 3, 2017 at 5:47
  • Kindly add the whole form code(including paynow() function) to support your question. Commented May 3, 2017 at 6:25

1 Answer 1

1

remove this action onsubmit='paynow();' and change action like this action='<?php echo base_url();?>index.php/users/reduce_amount/'

set this variable value in hidden field $currentSegment2 then try to run

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.