1

I am trying to send information from a to a DB.

I am using Jfactory. This is the HTML:

<textarea name="task" class="form-control" id="task"></textarea>

Variable:

$_POST['task']

This is the HTML that injects:

    $query = $db->getQuery(true);
 $query->insert($db->quoteName('#__reports'))
       ->columns(array('client', 'site', 'percent', 'tarea', 'time', 'assignto'))
       ->values(implode(',', array($db->quote($client), $db->quote($site), $db->quote($percent), $db->quote($task), $db->quote($getDate), $db->quote($userAssign)) ));
 $db->setQuery($query);
 $result = $db->query();

The weird thing is that everytime I put a "." (point) I got this error:

===> Invalid controller: name='dasdada', format=''

The MySQL field is on TEXT and I have tried LONGTEXT and Varchar

  • It's nothing to do with the query you've shown us – Lodder Oct 25 '15 at 10:07
1

It's probably because of textarea name, don't use 'task' which is in use for controller routing requests, try "mytask" or whatever, and update references elsewhere in the code

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.