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 7783873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:58:10+00:00 2026-06-01T19:58:10+00:00

I’m wondering if someone can help me with this. I am currently trying to

  • 0

I’m wondering if someone can help me with this. I am currently trying to integrate tank auth into my codeigniter site. I am slowly getting there but have run into a minor stumbling block in that when I have moved the error messages from being displayed as part of an html view to a javascript alert they are still printing out the paragraph tags around the error message.

The error messages which are passed to my login form as an array/ or multidimensional array I think are produced in the controller by the following lines of code:

$data['errors'] = array();
foreach ($errors as $k => $v)   $data['errors'][$k] = $this->lang->line($v);

Here is my code for displaying the error messages:

if ((isset($errors[$login['name']]))||(isset($errors[$password['name']]))||(form_error($login['name']))||(form_error($password['name']))){
        echo'<script type="text/javascript">alert("';
}
echo form_error($login['name']);
echo isset($errors[$login['name']])?$errors[$login['name']]:'';
echo form_error($password['name']); 
echo isset($errors[$password['name']])?$errors[$password['name']]:'';
if ((isset($errors[$login['name']]))||(isset($errors[$password['name']]))||(form_error($login['name']))||(form_error($password['name']))){
        echo'")</script>';
}

Now my primary question here is how to remove the paragreaph tags ande I have found a clue here in the codeigniter documentation:
http://codeigniter.com/user_guide/libraries/file_uploading.html
They key part here is that It says you can set the delimeters for the errors on the upload script by doing this:

$this->upload->display_errors('<p>', '</p>');

But I have no idea how and where to apply this to tank auth.

I also have a second question which I would be grateful to anyone who can answer, I am slightly confused by the code for displaying the error messages. For example:

echo form_error($password['name'])

can someone explain this to me, it has no $ at the beginning so is not a variable so whats it all about, and the thing I am really trying to get to is how to simplify my logic in checking for the error messages, since it is incredibly long winded at the moment and there are a lot of error messages to handle.

I appreciate there is a lot to deal with here but any help/explainations will be gratefully recieved.

  • 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-06-01T19:58:11+00:00Added an answer on June 1, 2026 at 7:58 pm

    To remove the tags wrapping the error message, you’ll have to call the set_error_delimiters() method of the Form Validation object with 2 empty strings as the parameters.

    $this->form_validation->set_error_delimiters('', '');
    

    More on this: https://codeigniter.com/user_guide/libraries/form_validation.html#changing-the-error-delimiters

    As for your second question, I’m not sure what you’re asking actually. It’s only a function call where the returned value of the call will be outputted to the user.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Does anyone know how can I replace this 2 symbol below from the string
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am currently running into a problem where an element is coming back from
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is

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.