kuau
11-07-2008, 12:47 AM
This code is supposed to check if the URL entered in the form starts with http://, and add it if it does not.
if( !ereg("^http://*", $ev_url, $regs) ) {
$ev_url = "http://" . $ev_url;
}
It doesn't seem to be working. The parts I don't understand are:
ereg ("^
and
$regs. I can find no $regs variable anywhere in the script.
Anyone know the best way to check a URL submitted through a form before inserting into a table?
Mahalo. erin :)
if( !ereg("^http://*", $ev_url, $regs) ) {
$ev_url = "http://" . $ev_url;
}
It doesn't seem to be working. The parts I don't understand are:
ereg ("^
and
$regs. I can find no $regs variable anywhere in the script.
Anyone know the best way to check a URL submitted through a form before inserting into a table?
Mahalo. erin :)