Jump to content

Moorcam

Members
  • Posts

    197
  • Joined

  • Last visited

Community Answers

  1. Moorcam's post in 500 Internal error when mod_rewrite enabled was marked as the answer   
    Never mind,
    Solved.
    mod_headers was disabled, causing a conflict in .htaccess.
  2. Moorcam's post in Unable to Import Excel or CSV was marked as the answer   
    Hi again all,
    Posting this for anyone who has experienced similar.
    It appears Codeigniter 3 has a bug that does not check for file extensions. Thus, not allowing certain files to be uploaded.
    The workaround is to create a piece of code that will do the checking for us  and allow for it to be uploaded.
    Here is that little piece of code:
    $ext = strtolower(pathinfo($_FILES['userfile']['name'], PATHINFO_EXTENSION)); if ($ext != "csv") { // Not a CSV file - send error $this->session->set_flashdata('error', 'Incorrect file extension uploaded. Only .CSV allowed!'); redirect("admin/csv"); } Works a charm, thanks to my good friend Craig.
  3. Moorcam's post in Printing Div loses style in preview was marked as the answer   
    If anyone else wants this, here's what solved it for me...
    document.getElementById("printButton1").addEventListener("click", function() { var printContents = document.getElementById('invoice').innerHTML; var originalContents = document.body.innerHTML; var printButton = document.getElementById("printButton1"); var closeButton = document.getElementById("closeButton1"); document.body.innerHTML = printContents; document.getElementById('printButton1').style.visibility = 'hidden'; window.print(); document.body.innerHTML = originalContents; window.location.reload(true); });  
  4. Moorcam's post in Showing Data Assigned to User was marked as the answer   
    Fixed
    Change the following:
    <td><?php echo $job->start_date;?></td> <td><?php echo $job->name;?></td> To...
    <td><?php echo $row['p_start_date']; ?></td> <td><?php echo $row['p_name']; ?></td>  
  5. Moorcam's post in Database Not Updating - CodeIgniter was marked as the answer   
    Fixed.
    Was not getting id from database.
    So, changed
    function update($id) { $this->db->where('id',$id); $this->db->update('tbl_team_member',$data); } to this
    function update($data) { $this->db->where('id',$this->session->userdata('id')); $this->db->update('tbl_team_member',$data); } Just in case anyone else runs into same issue.
  6. Moorcam's post in Undefined Method was marked as the answer   
    Ignore my impatient and lazy outburst of the "Please rescue me!". I went and put my grown up pants on and figured it out.
    I was missing some of the Model_FFleet file. Jeesh!
  7. Moorcam's post in Loop icon for PHP Search was marked as the answer   
    <input type="text" class="searchTerm" placeholder="What are you looking for?"> <button type="submit" class="searchButton"> <i class="fa fa-search"></i> </button> You need Font Awesome. If you have it, try the above. 
    https://fontawesome.com/icons?d=gallery&p=2
     
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.