954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

php record search from database

hello
I have a form which have 5 drop down boxes which contains the initial values now this is my database I want to make a search result page in php which displays a single record with have following validations:
if all options (college, class, rollnumber, student_name, section) vaules will be --- or blank then redirect to select.php page (i.e. main page)
student_name is not required in all cases it can be blanked but not all others
college, class, rollnumber, student_name, section all fields are strictly to be match with a database tables and shows only a certain 1 result of profile details
profile_detail table contains HTML value in database and profile_detail is a result which I want to display

If some one help me in this i'll be very thanks

CREATE TABLE IF NOT EXISTS `wizresult` (
`id` int(11) NOT NULL auto_increment,
`college` varchar(255) NOT NULL,
`class` varchar(255) NOT NULL,
`rollnumber` varchar(255) NOT NULL,
`student_name` varchar(255) NOT NULL,
`section` varchar(255) NOT NULL,
`profile_detail` longtext NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
hallianonline
Newbie Poster
15 posts since Aug 2010
Reputation Points: 10
Solved Threads: 0
 

Set JS validation for all without student name select box, So the user should enter all the combo boxes . Thus you can display result by using

SELECT * from table_name WHERE studentname = '$studentname' OR college = '$college' AND class = '$class' AND rollnumber = '$rollnum' AND section = '$section';
mohamedasif18
Junior Poster in Training
61 posts since Nov 2011
Reputation Points: 10
Solved Threads: 5
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You