Ok I'm totally lost. And I'm probably doing this totally wrong, but I guess thats why learning is so good. If anyone can help me out with this I would be very Thankful
Page 1
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<form action="action.php" method="post">
<p>Pick a number 1 -5 : <input type="text" name="expression" /></p>
<p><input type="submit" /></p>
</form>
</body>
</html>
Page 2
<html>
<head>
<title>PHP results</title>
</head>
<body>
<?php
$express = "5"
if (strpos($_POST['$expression'], $express) != false) {
?>
<strong>This is true.</strong>
<?php
} else {
?>
<strong>This is false.</strong>
<?php
}
?>
</body>
</html>
I have a feeling that my lack of knowledge is why I can't figure this out, and there is probably a large ammount of code that would be needed to do this. But if its something simple could you please point out what I'm doing wrong. If its some complex code then just let me know and disregard. I am tring the small stuff first, but its kicking my butt, so I don't want to get to far ahead of myself. Thanks in advance.
Edit : On a side note I don't think strpos() is the correct command to do this in the first place, but I could be wrong.