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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:37:56+00:00 2026-06-17T16:37:56+00:00

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

  • 0

I have a form :

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

a controller called **urlsubmission**

    # Determine whether domain already has been crawled.
                $this->load->model('domaincheckmodel');

                    $this->domaincheckmodel->verifyduplicates();

and a function within a model(domaincheckmodel) which basically checks for duplicate records and inserts a new domain:

function verifyduplicates(){
        # $_POSTed value of urlInput
        $tldEntered = $this->input->post('urlInput'); ## echo out $_POSTed domain entered.
        ## Gather if the domain exists in db
        $DupDomains = $this->db->get_where('ClientDomain', array('tld'=>$tldEntered));   // Get ClientDomain table

    if($DupDomains->num_rows() > 0 ){
        $this->load->view('err/domainexists'); ##domain already used
    }

    # else, no domain present, insert.
    else{
        #array of insert values:
        $insertNewDomain = array('tld'=>$tldEntered);
        $this->db->insert('ClientDomain', $insertNewDomain); 
        $this->load->view('success/domainfree'); ##domain is free and has not been entered.
    }

Problem is: when I submit, it submits a record to the database but tld is empty.

  • 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-17T16:37:57+00:00Added an answer on June 17, 2026 at 4:37 pm
    function verifyduplicates(){
        #PREPARE DATA
        if ($this->input->post('name_of_your_button')){
            $postedTLD = $this->input->post('urlInput');    // Get unsanitized data
            echo $postedTLD;
            $this->db->set('tld', $postedTLD); // AutoMagically escaped by AR
            #INSERT DATA
            $this->db->insert('ClientDomain'); 
        }
    } 
    

    just make sure that you have name your submit button

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

Sidebar

Related Questions

I have following html form: <form method=post action=> <input type=hidden name=userid id=user value=<?php echo
I have a form that looks like this. <form action=index.php method=post> <select name=dropdownOption> <option
okay, i have a form dropdown <select name=select_category id=select_category> <option value=cheese-cakes>Cheesecakes</option> <option value=fruit-cakes>Fruitcakes</option> </select>
I have tried to different ways to clear a form: <form action=service.php id=addRunner name=addRunner
I have a form (signup.php) that pops up in a nyroModal window when I
What I have so far: I have a form in PHP that contain the
I have a php form which saves these values to the database: id rand
I have a PHP form with 4 text fields and 2 checkboxes. The checkboxes
I have a php form that saves the info to my database and sends
I have a php form that has a known number of columns (ex. top

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.