Jump to content

I can't think of one


Kolusion

Recommended Posts

Sorry I couldn't think of a subject. I've been coding for 11 hours and my mind is fried.

 

This is what I have:

 

index.html

<FORM action="search.php" method="post">
<SELECT name="producttype">
	<OPTION>1</OPTION>
	<OPTION>2</OPTION>
</SELECT>
<INPUT type="submit" value="Submit">
</FORM>

 

What I am trying to do is get PHP to echo a phrase upon selection. I have tried the following, but the code isn't right:

 

search.php

<?php if ($producttype = "2") (echo "2 confirmed"
?>

<?php if ($producttype($value = "2")) (echo "2 confirmed"
?>

 

Does anyone know how it would be achieved?

Link to comment
https://forums.phpfreaks.com/topic/245228-i-cant-think-of-one/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.