WHERE filtering of records to display

I am an extreme PHP beginner. What I construct is from bits and pieces found online and trial and error. Here is the problem. I have a form in an HTML page asking for a user input (a number from 1-100 with validation) called XBTR_NUM. A PHP page is supposed to display only those records from that user’s inputted XBTR_NUM.

I know to use the WHERE command to filter the appropriate records; I don’t know the proper syntax to make it work. If I manually insert a number in the PHP WHERE code, the proper records for that number are displayed. I need to make the WHERE variable linked to the user’s input of XBTR_NUM.

Any help would be appreciated.

I suggest you go through a tutorial rather then grabbing bits and pieces.

Start here: http://www.w3schools.com/php/default.asp

First problem. I agree with Kevin, learn before you start creating your own thing. It will be easier on you and require far less hand holding.

Interestingly enough, there is such a thing as not being ready to ask for help.

Sponsor our Newsletter | Privacy Policy | Terms of Service