latheesan
06-30-2005, 07:26 PM
hey everyone,
I've been recently working on a registeration script, written in php. Im finished and currently de-bugging the script.
on registeration form, user has the option to enter their website. so in my register.php file, i've made a function that chnages the wronly written web url into correct form. e.g, htp:/ to http://. Anyway, when the script is in use, i keep getting this error:
Warning: preg_match() [function.preg-match]: Unknown modifier '(' in root\htdocs\members\register.php on line 52
the error is caused by these lines of code in my register.php file
if ($_POST['website'] != '' & !preg_match("/^(http|ftp):///", $_POST['website'])) {
$_POST['website'] = 'http://'.$_POST['website'];
Could anyone please help me debug this code?
Many thanks in advance for any help anyone can offer
I've been recently working on a registeration script, written in php. Im finished and currently de-bugging the script.
on registeration form, user has the option to enter their website. so in my register.php file, i've made a function that chnages the wronly written web url into correct form. e.g, htp:/ to http://. Anyway, when the script is in use, i keep getting this error:
Warning: preg_match() [function.preg-match]: Unknown modifier '(' in root\htdocs\members\register.php on line 52
the error is caused by these lines of code in my register.php file
if ($_POST['website'] != '' & !preg_match("/^(http|ftp):///", $_POST['website'])) {
$_POST['website'] = 'http://'.$_POST['website'];
Could anyone please help me debug this code?
Many thanks in advance for any help anyone can offer
