Codeigniter: "The URI you submitted has disallowed characters" when submitting a form

Sebastian Breit

So I have a simple form with some inputs in my codeigniter project:

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
        <input type="hidden" name="new_project" value="true"/>
        <input type="text" placeholder="Nombre" name="nombre"/><br/>
        <input type="text" placeholder="Cliente" name="cliente"/><br/>
        <input type="submit" value="crear"/>
</form>

When I submit the form, I get the following message:

An Error Was Encountered
The URI you submitted has disallowed characters.

and in the address bar of my browser, the following appears:

http://mycodeigniterproject/index.php/projects/manage%20%3E%3Cinput%20type=

I already tried modifying this in my config.php file:

$config['permitted_uri_chars'] = '+=a-z 0-9?~%.,:_\-';

and

$config['enable_query_strings'] = TRUE;

Thanks for your attention

Sebastian Breit

So I feel pretty stupid now. I was trying to submit a file without the multipart :S

here is the corrected code:

<?php echo form_open_multipart('projects/manage?pid='.$project->id);?>
    <input type="file" name="userfile"/><br/>
    <input type="submit" value="crear"/>
</form>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Related Related

HotTag

Archive