Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

[HELP]Combo box filtering PHP Javascript

rempelt

Recruit
Basic Member
Messages
13
Reaction score
0
Points
16
guys pahelp naman po.. newbie lang.. may isa po kasi ako combo box wich is mgffilter ng mga details View attachment 201449 ... kapag po may pinili ako sa combo box ibabAto nya po yung mga details na nasa database View attachment 201450 pahelp naman po..

my codes for combo box.. hindi ko po kasi alam kng pano sa javascript. salamat po
Code:
$sql="SELECT * FROM esubject";
$stmt=$con->prepare($sql);
$stmt->execute();
$strCC=" <div class='six columns noleftmargin'>";
$strCC.='<select name="cbCourse" id="cbCourse">';
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){
	
	
 		$strCC.='<option value="'.$row['esub_id'].'">'.$row['subjectcode'].'</option>';		
 		
		
		}
		echo $strCC;
		?>
 $sql="SELECT * FROM esubject";
$stmt=$con->prepare($sql);
$stmt->execute();
$strCC=" <div class='six columns noleftmargin'>";
$strCC.='<select name="cbCourse" id="cbCourse">';
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){
	
	
 		$strCC.='<option value="'.$row['esub_id'].'">'.$row['subjectcode'].'</option>';		
 		
		
		}
		echo $strCC;
		?>
        	
		</select>
			</div>
 				<br \><br \><label>Desciption</label>
 			<textarea name='comment' class='smoothborder ctextarea' rows='2' placeholder='Description, comments *'></textarea>
		
                <label>Units Lab</label>
		<label id="lab">    </label>

		<label>Units Lecture</label>
		<label id="lect">    </label>

- - - Updated - - -

patulong po.. T_T

- - - Updated - - -

wala po mkakatulong?.. T_T
 

Attachments

  • Untitled.png
    Untitled.png
    5.9 KB · Views: 10
  • Untitled1.png
    Untitled1.png
    36.4 KB · Views: 9
Last edited:
TS,

Magulo ang code mo, Paki detail ang problem. I paste mo dito ang input para mas matulungan ka. :)
 
Last edited:
Ts gamit ka ng Ajax para dyan. :)
research nalang po madali lang po yun pramis
 
ung SQL syntax mo po palitan mo nung value nung nasa combo box mo.. example

SELECT * FROM TABLE WHERE SUBJECT = "combo_box_value"
 
Back
Top Bottom