Hoi allemaal.
Ik ben bezig met me website over te zetten naar mysqli, maar ik kom deze foutmeldingen tegen.
Dit heb ik tot regel 203. Het gaat om regel 177Code:Warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/gebruiker/domains/domeinnaam.nl/public_html/script.php on line 177t/m regel 203Code:$captcha = preg_replace("10", "J", $captcha);Dit is me script.Code:$captcha = preg_replace("9", "I", $captcha);
Weet iemand de fout?Code:<? $first = rand(1, 26); $second = rand(1, 26); $third = rand(1, 26); $fourth = rand(1, 26); $captcha = ("$first $second $third $fourth"); include("lib/captcha/captcha.php?CODE=$captcha"); ?><img src="lib/captcha/captcha.php?CODE=<?=$captcha;?>" border="1" align="left"><? $captcha = preg_replace("10", "J", $captcha); $captcha = preg_replace("11", "K", $captcha); $captcha = preg_replace("12", "L", $captcha); $captcha = preg_replace("13", "M", $captcha); $captcha = preg_replace("14", "N", $captcha); $captcha = preg_replace("15", "O", $captcha); $captcha = preg_replace("16", "P", $captcha); $captcha = preg_replace("17", "Q", $captcha); $captcha = preg_replace("18", "R", $captcha); $captcha = preg_replace("19", "S", $captcha); $captcha = preg_replace("20", "T", $captcha); $captcha = preg_replace("21", "U", $captcha); $captcha = preg_replace("22", "V", $captcha); $captcha = preg_replace("23", "W", $captcha); $captcha = preg_replace("24", "X", $captcha); $captcha = preg_replace("25", "Y", $captcha); $captcha = preg_replace("26", "Z", $captcha); $captcha = preg_replace("0", "", $captcha); $captcha = preg_replace("1", "A", $captcha); $captcha = preg_replace("2", "B", $captcha); $captcha = preg_replace("3", "C", $captcha); $captcha = preg_replace("4", "D", $captcha); $captcha = preg_replace("5", "E", $captcha); $captcha = preg_replace("6", "F", $captcha); $captcha = preg_replace("7", "G", $captcha); $captcha = preg_replace("8", "H", $captcha); $captcha = preg_replace("9", "I", $captcha); $captcha = str_replace(" ", "",$captcha); $_SESSION['captcha'] = $captcha; ?>
- Captcha werkt niet
-
15-06-2013, 18:47 #1
- Berichten
- 103
- Lid sinds
- 12 Jaar
Captcha werkt niet
-
-
15-06-2013, 20:03 #2
- Berichten
- 2.816
- Lid sinds
- 19 Jaar
Re: Captcha werkt niet
Je dient als je het op jou manier wil doen str_replace te gebruiken
$captcha = str_replace("10", "J", $captcha);
Zie de 1 na laaste regel.
-
15-06-2013, 20:18 #3
- Berichten
- 103
- Lid sinds
- 12 Jaar
Re: Captcha werkt niet
Bedankt, het werkt.
Plaats een
- + Advertentie
- + Onderwerp
Marktplaats
Webmasterforum
- Websites algemeen
- Sitechecks
- Marketing
- Domeinen algemeen
- Waardebepaling
- CMS
- Wordpress
- Joomla
- Magento
- Google algemeen
- SEO
- Analytics
- Adsense
- Adwords
- HTML / XHTML
- CSS
- Programmeren
- PHP
- Javascript
- JQuery
- MySQL
- Ondernemen algemeen
- Belastingen
- Juridisch
- Grafisch ontwerp
- Hosting Algemeen
- Hardware Info
- Offtopic