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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:43:25+00:00 2026-06-17T15:43:25+00:00

I have a Codeigniter Form : <?php $attr = array(‘id’=>’urlSubmit’,’method’=>’post’); $urlInputAttr = array(‘name’=>’urlInput’,’value’=>’yourdomain.com’,’maxlength’=>’50’,’size’=>’25’); echo

  • 0

I have a Codeigniter Form:

<?php
    $attr = array('id'=>'urlSubmit','method'=>'post');
    $urlInputAttr = array('name'=>'urlInput','value'=>'yourdomain.com','maxlength'=>'50','size'=>'25');
    echo form_open('urlSubmission',$attr);
    echo form_input($urlInputAttr);
    echo form_close();
?>

then a controller:

 $this->load->view('support/header', $urlSubmissionMeta); ## Header info 
  $this->load->view('support/toolbar'); #logo
  //
    # Determine whether domain already has been crawled.
    $this->load->model('domaincheckmodel');
        $this->domaincheckmodel->verifyduplicates(); 

    # Then Perform Scan
    $this->load->model('performscanmodel');
        $this->performscanmodel->fetchlinks();

A model, called domaincheckmodel.php:

   function verifyduplicates(){
        #PREPARE DATA
        $postedTLD = $_POST["urlInput"];    // Get unsanitized data
        $sql = "SELECT tld from ClientDomain WHERE tld = ?";
        $endquery = $this->db->query($sql,array($this->db->escape_str($postedTLD))); // Query db

        #CONDITION   - if #rows GT 0, load domain already exists.
        if($endquery->num_rows() > 0){
            $this->load->view('err/domainexists'); ##domain already used
            ## redir to new pagee to .. please login..
        } 

        else{ #number of rows must be 0, insert into db
            $newDomain = "INSERT INTO ClientDomain(tld) VALUES('".$this->db->escape_str($postedTLD)."')";
            $this->db->query($newDomain);

            $this->load->view('success/domainfree');
            ## please register to begin saving history of your scans, without doing so you lose results.
        }

The problem is when I submit the form, the if{} and else{} statements work fine in the model, but the variable $postedTLD is sending a blank value to mysql.

Any thoughts here why this is being sent?

  • 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-17T15:43:26+00:00Added an answer on June 17, 2026 at 3:43 pm
    $postedTLD = $_POST["urlInput"]; 
    

    should be:

    $postedTLD = $this->input->post('urlInput');
    

    See the documentation for more info on how to access POST values.

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

Sidebar

Related Questions

I have built a Login form under PHP Codeigniter framework and its validation rules
I am using Codeigniter framework and I have a form with input fields. When
I have a simple form in codeigniter that I wish to use for the
I have the following php code using the codeigniter framework $this->form_validation->set_rules('money', 'Money', 'integer|required|xss_clean'); It
I have created a form maker somewhat like Formtorch for codeigniter. The form consists
I am trying to learn PHP with codeigniter, had have come across a problem.
i have a form that uses a drop down and im using codeigniter ,
I'm using Codeigniter framework to create my web application. I have a login form
I'm using Codeigniter framework to create my web application. I have a login form
I have a form that submits data to a database in a CodeIgniter app

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.