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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:58:21+00:00 2026-06-01T15:58:21+00:00

Ok, I’m working on a php college project, and I have to let students

  • 0

Ok, I’m working on a php college project, and I have to let students register, submit their details- firstname, surname, phone number, id number, etc.

At first I used int for id number but I’m not going to do any math with it so I changed it to varchar, however after this change, all the examples I submitted still comes out with the maximum int value “2147483647” when I specified it to be varchar, why does this happen and how can I fix it.

If it helps the collation of the table fields are all latin1_swedish_ci.
I’m not a MySQL expert, so if there is any other info you need to get to the bottom of this problem just ask.

Edit: I also changed the fields’ value back to bigint and it still throws 2147483647 in the table, even though I entered 8888888888888(13 characters), so with varchar or bigint i still get 2147483647, what am I doing wrong?

Update:I got the following error from phpmyadmin when trying to change the max value for the field.

  SQL query:

ALTER TABLE  `student` CHANGE  `idno`  `idno` BIGINT( 99999999999999 ) NOT NULL

MySQL said: 

#1439 - Display width out of range for column 'idno' (max = 4294967295) 

Update: taking out intval() fixed this issue

 $id_number=intval($_POST['id_number']);
 $id_number=($_POST['id_number']);
  • 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-01T15:58:22+00:00Added an answer on June 1, 2026 at 3:58 pm

    Don’t use varchar as ID unless you really need to use letters in the ID (PK?) field. It’s faster to use integers. Maybe the PHP script is trying to change the DB’s varchar to an integer so change the ID back to int.

    Do you really need bigint? Unsigned int may be more than enough.
    http://dev.mysql.com/doc/refman/5.0/en/integer-types.html

    Update: If you need to make sure the value is an integer you should check it’s datatype.

    if(is_int($my_value)){
      //do the script
    }
      else{
        //echo error message
      }
    

    If the value comes from DB (column which’s datatype is integer) everything should be OK but it never hurts to check…

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
I have a jquery bug and I've been looking for hours now, I can't
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into

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.