Guys plz need a help.

I have index page

<form id="form1" name="form1" method="get" action="show.php">
<select name="cg" onchange="SearchC();" id="catG"  > 
		     <option value="1" >ВСЕ КАТЕГОРИИ</option> 	     
		    <option value="2"<? if($pcat=="2")echo "selected='selected'"; ?>>subject</option> 	
		    <option value="3" <? if($pcat=="3")echo "selected='selected'"; ?>>faculty</option> 
		    <option value="4" <? if($pcat=="3")echo "selected='selected'"; ?>>lecture</option> 		        	
</select>	
</form>

then

function SearchC() {
	var category = $("#catG").val();	
	var query = "searchbox.php?ct="+category;		
	$.ajax({
		url: query,
		success: function(data, textStatus, XMLHttpRequest) {			
			$("#searchcontents").html(data);
			SearchCCallBack(false);			
		}
	});
}

and searchbox.php

<?
if (($_GET['ct'] == '1'))
{
?>				

	
	<select name="subj" id="subj" class="textbox">
	<option value="1"> math </option>
        <option value="2"<? if WHAT TO WRITE HERE echo "selected='selected'";?>>phys</option>
	</select>	
<?php
} ?>

how i can pass certain options "SELECTED" to show.php from searchbox.php. how to display everything in show.php?

values from form1 m passing like -> if (isset($_GET)){$pcat=$_GET;}

then Im moving to show.php i need to show appropriate cg and subj which I selected in index.php.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.