unwanted notice

[php]<?php
$value2 = $_POST[‘name’];
if(stristr($value2,shaon))
{
echo “Shaon is present”;
}
else
{
echo “Shaon is absent”;
}
?>[/php]
The above code works fine for me,but i get a notice statement along with the result

Notice: Use of undefined constant shaon - assumed 'shaon' in E:\xampp\htdocs\4test\new.php on line 3 Shaon is absent

How do i get rid of the Notice??

put shaon in between single quotes on line three. ‘shaon’

Thankyou AnotherWannabe.
Also is it possible to add more words in that line?

Something like this:

if(stristr($value2,'shaon' || 'Jake' || 'john'))

I would guess not. But I don’t know. Maybe do something like:

[php]
$array = array(‘shaon’, ‘Jake’, ‘john’);
for each ($array as $value) {
if (stristr($value2, $value)) {
echo $value.‘is present.
’;
}
}
[/php]

thanks for that .

Sponsor our Newsletter | Privacy Policy | Terms of Service