-1

i cannot print my desire path in the form action i set a condition that id the $edit array is set then page goes to add_new_proposal function which i define in my controller and if the $edit variable is not set then it goes to edit_new_proposal function

here is the code of action of form

 <form role="form" method="post" action="<?php if(isset($edit)){echo 'base_url();proposal/add_new_proposal';}else{echo 'base_url();proposal/edit_new_proposal';}?> " enctype="multipart/form-data"> 
2
  • 3
    echo base_url() . 'proposal/add_new_proposal'; read more about concatenation in php Commented Mar 18, 2018 at 9:17
  • can you give ma a feed back on my this Question i will be very thankful to you Here is the Question Commented Mar 18, 2018 at 9:30

2 Answers 2

1

Change:

echo 'base_url();proposal/add_new_proposal'; 

to:

echo base_url().'proposal/add_new_proposal'; 

And

echo 'base_url();proposal/edit_new_proposal'; 

to:

echo base_url().'proposal/edit_new_proposal'; 
Sign up to request clarification or add additional context in comments.

3 Comments

Combining strings together: stackoverflow.com/questions/8336858/…
thanks so much for your feed back
can you give ma a feed back on my this Question i will be very thankful to you Here is the Question
-1

According to your code base_url() is a function and you are adding it as a string in the echo statement. Change it as shown below:

 <form role="form" method="post" action="<?php if(isset($edit)){echo base_url() . ‘proposal/add_new_proposal';}else{echo base_url() . ‘proposal/edit_new_proposal';}?> " enctype="multipart/form-data"> 

2 Comments

thanku very much :)
hungersoft can you give ma a feed back on my this Question i will be very thankful to you Here is the Question

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.