Question: I am getting this warning:

> 
> Deprecated: Function `ereg()` is deprecated in
> 
> 
> 

PHP Code:

```
if ($kill_bullets == 0 || !$kill_bullets || ereg('[^0-9]',$kill_bullets)){
    echo "Invalid Bullets!";
} elseif ($kill_bullets != 0 || $kill_bullets || !ereg('[^0-9]',$kill_bullets)) {
}

```

Answer: 
```
if (!$kill_bullets || !ctype_digit($kill_bullets)) {
    echo "Invalid Bullets!";
}

```

---

> 
> When i click sumbit button nothing happens? 
> 
> 
> 

Try this snippet.

```
if (!$kill_bullets || !ctype_digit($kill_bullets)) {
    echo "Invalid Bullets!";
} else {
    echo "Valid Bullets. okay.";
}

```
The POSIX compatible regexps [are deprecated](http://de3.php.net/manual/en/intro.regex.php). You should use the PCRE instead.

[preg\_match](http://www.php.net/manual/en/function.preg-match.php) would be the equivalent to ereg with a little bit different syntax.