Error when trying to check the syntax of a URL
Posted: Sat Nov 27, 2004 3:21 pm
Hi, apologies if this has been asked before but I get this error
It simply looks at user input from a form to check if the URL they give is in a valid format.
Advice welcome!
[/php_man]
Relating to this bit of code:Warning: Unknown modifier '/' in /home/qhwslos/public_html/register.php on line 75
Code: Select all
<?php
if ($_POST['website'] != '' & !preg_match("/^(http|ftp):///", $_POST['website'])) {
$_POST['website'] = 'http://'.$_POST['website'];
}
?>Advice welcome!
[/php_man]