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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:20:20+00:00 2026-05-22T23:20:20+00:00

I have a form where a user submits his member name, first and last.

  • 0

I have a form where a user submits his member name, first and last. I want to combine these two and send them to the database as a member ID using code igniter’s url_title functionality. In other words just making sure that it’s all lower case, underscores, URL safe, etc. This is the code in my model, but in the database I’m getting a value of zero for the memberID:

$v_membername = $this->input->post('f_membername');
$v_memberlast = $this->input->post('f_memberlast');
$v_memberid = $v_membername + "_" + $v_memberlast;
$v_memberid = url_title($v_memberid, 'underscore');

$data = array(
    'member_name' => $v_membername,
    'member_last' => $v_memberlast,
    'member_id' => $v_memberid
);

$this->db->insert('members', $data);

Any idea what I’m doing wrong here? membername and memberlast submit to the DB just fine.

  • 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-05-22T23:20:21+00:00Added an answer on May 22, 2026 at 11:20 pm

    PHP uses . to concat strings, not +.

    $v_memberid = $v_membername . "_" . $v_memberlast;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form where the user can update his name and last name.
I have form where user submits field. Field can have letters, numbers, and punctuation.
I have a form, and a submit handler in jQuery. When the user submits
I have situation like this: user submits form with action='/pay' in '/pay' I have
I have a registration form where this CSS rules apply. when user submits with
I have the code below on form so that the user submits the form
I have a canvas page with a form. When the user submits the form,
I have a form, user enters some data then submits. Rather than a popup
I have a form, when user submit the form, I want to direct the
Let say I have a post from like this: <form action=myApp/form_action.asp method=post> First name:

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.