Hey guys,

I'm working on a ajax drop down system.

I'm currently finding myself in a difficulty with a $_POST[].

The thing is that I want to explode my $_POST but it doesn't let me for something, cant find it out why.

case 2:
		
			if(strstr($_POST['modelBox'],'^'))
			{
				$ex = $_POST['modelBox'];
				$explodeBox = explode('^',$ex);
				if($explodeBox[1] == '')
				{
					$modelBox = ' WHERE model = "'.$explodeBox[0].'"';
				}
				else
				{
					$modelBox = ' WHERE model = "'.$explodeBox[0].'" AND production_year = "'.$explodeBox[1].'"';
			}								
			
			$sql = 'SELECT DISTINCT(wheel_dimension),material FROM catalogue.wheel_code '.$modelBox.' ORDER BY wheel_dimension ASC;';
			$depts = mysql_query($sql);
			while (list($wheel_dimension,$material) = mysql_fetch_array($depts))
				echo $wheel_dimension."=".$wheel_dimension."*";
			break;

This is the $_POST ->

model = 'Golf IV Variant^01.99-04.07'

Recommended Answers

All 2 Replies

Member Avatar for diafol

You're using 'model' and 'modelBox' - change either one to the other.

That was it :) Thanks!

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.