0

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>';
?>
1
Contributor
1
Reply
2
Views
6 Years
Discussion Span
Last Post by MsuDU19
0

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>";
?>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.