Hallo iedereen,
ik heb hier een code, Alle scheld woorden staan in de tabel (Scheldwoorden) Met 2 velden "id""Scheldwoorden"
Database:
Script:
Maar hij zou dus dan bij $censuur = array($censuur1); alle scheldwoorden uit de database ophalen en dan op de plaats waar $censuur1 (ook hier: $censuur = array($censuur1)
zou die dus dan alle scheld woorden zo moeten neer zetten: $censuur = array(kk, KK); maar dat werkt niet?
alvst bedankt!
streaming
ik heb hier een code, Alle scheld woorden staan in de tabel (Scheldwoorden) Met 2 velden "id""Scheldwoorden"
Database:
-- phpMyAdmin SQL Dump
-- version 3.2.5
-- http://www.phpmyadmin.net
--
-- Machine: localhost
-- Genereertijd: 07 Apr 2010 om 19:46
-- Serverversie: 5.0.67
-- PHP-Versie: 5.2.12
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `jkoemans_balk`
--
-- --------------------------------------------------------
--
-- Tabelstructuur voor tabel `scheldwoorden`
--
CREATE TABLE IF NOT EXISTS `scheldwoorden` (
`id` int(3) NOT NULL auto_increment,
`scheldwoorden` varchar(25) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
--
-- Gegevens worden uitgevoerd voor tabel `scheldwoorden`
--
INSERT INTO `scheldwoorden` (`id`, `scheldwoorden`) VALUES
(1, kk);
(2, KK); Script:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"config.php"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]" <a href="site.php?p=toevoegen">Bericht plaatsen</a> "[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<marquee width=88% style="cursor: default" onmouseover="this.stop()" onmouseout="this.start()">"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$censuur1[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM `scheldwoorden`"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM berichtenbalk ORDER BY id DESC LIMIT "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$hoeveel[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/while"]while[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$obj[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_object"]mysql_fetch_object[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700])) {[/COLOR]
[COLOR= #0000BB]$naam[/COLOR] [COLOR= #007700]=[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][COLOR= #0000BB]$obj[/COLOR][COLOR= #007700]->[/COLOR]naam[COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][COLOR= #0000BB]$obj[/COLOR][COLOR= #007700]->[/COLOR]bericht[COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$censuur[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$censuur1[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$censuur[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]bobba[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$naam[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$censuur[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]Bobba[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$naam[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<b>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$naam[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"</b>: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$teken[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"</marquee>"[/COLOR][COLOR= #007700];[/COLOR]
?> Maar hij zou dus dan bij $censuur = array($censuur1); alle scheldwoorden uit de database ophalen en dan op de plaats waar $censuur1 (ook hier: $censuur = array($censuur1)
zou die dus dan alle scheld woorden zo moeten neer zetten: $censuur = array(kk, KK); maar dat werkt niet?alvst bedankt!
streaming

