Here is what i have a problem with. I need to display variable inside of an html table if the variable's are not empty from a form on a previous page. When the form is fully filled out it isn't displaying any of the table at all. Please help.

<? 
$makemodel=$_GET['makemodel'];
$minprice=$_GET['minprice'];
$maxprice=$_GET['maxprice'];
$year=$_GET['year'];

If (empty($minprice)or($maxprice)or($year))
echo'<p class:"error_display">Please go back and fill in your form correctly</p>';
Else echo'<table class="output_table">	
<tr>
<td>Make/Model</td>
<td>$makemodel</td>
</tr>
<tr>
<td>Minimum Price:</td>
<td>$$minprice</td>
</tr>
<tr>
<td>Maximum Price:</td>
<td>$$maxprice</td>
</tr>
<tr>
<td>Year:</td>
<td>$year</td>
</tr>
</table>';
?>

oh i also need to add this to the end of the code also but I'm not sure how to code this with if else statements etc. If i can make this all one php function that would be awesome. Please be kind I am new to php and teaching myself.

<? if ($minprice>=40000)
	echo'<p>Wow $$minprice, that is an expensive car!</p>';
	if ($minprice<40000)
	echo"<p>Ok $$minprice, that is a reasonable car price.</p>";
?>
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.