I'm trying to submit values to the database but i get an error message
Deprecated: Function eregi() is deprecated in C:\wamp\www\OB\admin_add_acc.php on line 20 and 27
Here is the code:
<?php
include 'db_connect.php';
if(isset($_POST['Submit']))
{
$acc_type=ucwords($_POST['acc_type']);
$minbalance=ucwords($_POST['minbalance']);
if (!eregi ("^[a-zA-Z ]+$", stripslashes(trim($acc_type))))//line 20
{
echo "Enter Valid Data for Account Type!";
exit(0);
}
else
{
if (!eregi ("^[0-9 ]+$", stripslashes(trim($minbalance))))//line 27
{
preg_match
instead oferegi
– Dugongereg*
functions are deprecated. That exactly what manual says – Wellnighif(eregi('VERIFIED', $info)) {
useif(preg_match('/VERIFIED/i', $info)) {
. The i flag indicates a case-insensitive search. Guess this helps too. – Dicho