monstertocode Posted December 11, 2017 Share Posted December 11, 2017 hi everyone, i have been having trouble with the links of my addon module. I have a function in my module that is only allowed for the admin and it's called "insert" and the module is called client_document. What i want to do is a insert into the database with this action and this is what i have <form method="post" action="index.php?module=client_document&action=insert" enctype="multipart/form-data"> <input type="hidden" name="userid" value="{$data["userid"]}" /> <table class="clientssummarystats" cellspacing="0" cellpadding="2"> <tr><td width="40">{$_ADDONLANG[clientsummary][filetitle]}</td><td class="fieldarea"><input type="text" name="title" style="width:90%" /></td></tr> <tr><td>{$_ADDONLANG[clientsummary][filename]}</td><td class="fieldarea"><input type="file" name="uploadfile" style="width:90%" /></td></tr> <tr> <td width="40"> {$_ADDONLANG['clientsummary']['type']} </td> <td class="fieldarea"> <select type="text" name="typeid" style="width:90%"> <option disabled selected>{$_ADDONLANG['clientsummary']['option']['default']}</option> {foreach ($filetypes as $type)} <option value="{$type->id}">{$type->typename}</option> {/foreach} </select> </td> </tr> <tr> <td> </td> <td class="fieldarea"><input type="checkbox" name="adminonly" value="1" /> {$_ADDONLANG[clientsummary][fileadminonly]} <input type="submit" value="{$_ADDONLANG['global'][submit]}" /> </td> </tr> </table> </form> and went i try it to insert a file well it doesn't and send me to the admin dashboard. just for additional information in the insert function the only thing that exists there is a dd(). Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts