• Login
  • Register
  • Zoek
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Filebase Entry
  • More Options

ICTscripters

Dé plek voor IT

Dé plek voor IT

Login

Geavanceerde opties
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  9. Goedkope domeinnamen
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  9. Goedkope domeinnamen
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  9. Goedkope domeinnamen
  1. Dé plek voor IT - ICTscripters
  2. Forum
  3. Scripting & programmeren
  4. PHP + SQL

Forum

  • Beta-testers gezocht voor Crypto-oefenplatform

    Syntax 29 januari 2026 om 16:11
  • Na 15 jaar terug van weggeweest: iCriminals.nl is terug (BETA)!

    Syntax 19 januari 2026 om 09:34
  • Developer Gezocht

    Mikevdk 10 januari 2026 om 18:57
  • Op zoek naar de legends

    Syntax 5 januari 2026 om 13:50
  • [FREE] WeFact Hosting module

    Jeroen.G 13 oktober 2025 om 14:09
  • Help testers nodig voor android app Urgent

    urgentotservices 26 september 2025 om 10:21
  • Versio vervanger

    Jeroen.G 25 augustus 2025 om 15:56
  • Afspraken systeem met planbeperking

    Lijno 1 augustus 2025 om 23:04

Marktplaats

  • 350 Nieuwe Domeinnamen Januari 2026

    shiga 1 februari 2026 om 14:21
  • 321 Nieuwe Domeinnamen December 2025

    shiga 1 januari 2026 om 10:26
  • Meerdere mafia game template te koop

    Syntax 26 december 2025 om 00:07

Doorstuur laatste bericht

  • Shahiem
  • 19 september 2010 om 10:14
  • Shahiem
    http://www.hogwartscastle
    Berichten
    216
    • 19 september 2010 om 10:14
    • #1

    Hey,

    Ik heb een nieuws reactie script maar ik wil dat als je een nieuwe reactie post dat je wordt doorgestuurd naar die reactie. Maar mijn param 2 wilt het niet doen.

    Weet iemand hoe ik dit oplos?

    PHP
    <?php
    include 'includes/config.php';
    
    
    if(isset($param[1]))
    {
    	
        $nieuwsQuery = $core->mysql->query("SELECT
                                             id,
                                             titel,
                                             inhoud,
    										 schrijver_id,
    										 datum
                                            FROM
                                                nieuws_nieuwsberichten
                                            WHERE
                                                id = '".$param[1]."'");
                                                
    
    
        $nieuwsFetch = $core->mysql->fetch($nieuwsQuery);
    	
    	$aantalcommentsQuery = $core->mysql->query("SELECT
    													1
    												FROM
    													nieuws_reacties
    												WHERE
    													nieuwsbericht_id = '".$param[1]."'");
    	$totaal  = $core->mysql->num_rows($aantalcommentsQuery); 
    	$huidige = (isset($param[2]) && ctype_digit($param[2]) && $param[2] > 0) ? $param[2] : 1;
    	$per_pagina = 10;	
    	$str = paging('nieuws/'.$param[1].'/', $totaal, $per_pagina, $huidige);
    
    
        $reactiesQuery =  $core->mysql->query("SELECT
    											n.id,
    											n.lid_id,
    											n.inhoud,
    											n.datum,
    											l.uLeerjaar,
    											l.uAvatar,
    											l.uName,
    											l.uRang,
    											l.uAfdeling
    										FROM
    											nieuws_reacties n,
    											leden_leden l
    										WHERE
    											n.nieuwsbericht_id = '".$nieuwsFetch['id']."'
    										AND
    											n.lid_id = l.uId
    										ORDER BY
    											n.id
    										LIMIT
    											".(($huidige * $per_pagina) - $per_pagina).", ".$per_pagina);
    
    
        define('_TITLE_', $nieuwsFetch['titel']);
       	include 'includes/header.php';
        
       
         if($core->mysql->num_rows($nieuwsQuery) == 1)    
         {   
            
                echo '<div class="nieuws-titel">&rsaquo;  <strong>'.$nieuwsFetch['titel'].'</strong></div>
                        <div class="nieuws-container">'.parseUbb($nieuwsFetch['inhoud']).'</div>
    					<div class="nieuws-bottom" style="margin-bottom: 20px;">Gepost op '.$nieuwsFetch['datum'].' door '.$core->leden->naam($nieuwsFetch['schrijver_id']).'</div>';
            
            if($core->mysql->num_rows($reactiesQuery) >= 1)    
            {
    
    
                while($reactiesFetch = $core->mysql->fetch($reactiesQuery))
                {
                   ?>
                        <div class="nieuws-titel">&rsaquo;  <strong>Gepost op <?php echo $reactiesFetch['datum']; ?></strong></div>
                            <div class="reactie-container" id="post_<?php echo $reactiesFetch['id']; ?>">
                                <div class="nieuws-inhoud">
                                        <div class="nieuws-ledeninfo">
                                            <a href="<?php echo _ROOT_; ?>profiel/<?php echo $core->leden->naam($reactiesFetch['lid_id']); ?>" style="text-decoration: none;"><span style="color: #<?php echo $reactiesFetch['uColor']; ?>; font-weight: bold"><?php echo $core->leden->naam($reactiesFetch['lid_id']); ?></span></a><br />
    										<small><?php echo $functies[$reactiesFetch['uRang']]; ?></small><br /><br />
    										<img src="<?php echo _ROOT_; ?><?php echo $reactiesFetch['uAvatar']; ?>" alt="Avatar" /><br /><br />
    										
    										<?php echo $reactiesFetch['uLeerjaar']; ?><sup>e</sup> <?php echo $afdelingen[$reactiesFetch['uAfdeling']]; ?>
                                        </div>
                                        <div class="nieuws-bericht">
                                            <?php echo parseUbb($reactiesFetch['inhoud']); ?>
                                        </div>
                                <div style="clear: both;"></div>
                                </div>
                        </div>
                    <?php                     
                }
    			
    echo ''.$str.'';
    
    
    
    
            }
            else
            {
                
                echo '<strong>Er zijn geen reacties in dit nieuwsbericht.</strong>';
                
            }
    
    
        }
        else
        {
            
             header('Location: '._ROOT_.'');
        }    
        
        if($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['submit'])
        {
            
            if(trim($_POST['bericht']) == '')
            {
                $core->fouten->add('Je bent een bericht vergeten in te vullen.');
            
            }
            
            if($core->fouten->aantal() == 0)
            {
                
                $core->mysql->query("INSERT INTO
                                            nieuws_reacties
                                        (
                                            lid_id,
                                            datum,
                                            inhoud,
                                            nieuwsbericht_id
                                        ) VALUES (
                                            '".$core->leden->info['mijn']['uId']."',
                                            NOW(),
                                            '".$core->mysql->escape($_POST['bericht'])."',
                                            '".$core->mysql->escape($param[1])."'
                                        )");
    									
    			$postid = $core->mysql->insert_id();
                                        
               	header('Location: '._ROOT_.'nieuws/'.$param[1].'/'.$param[2].'#'.$postid.'');
                
    	}
    	else
    		echo '<br />'.$core->fouten->weergeef();
          }  
        
            ?>
            	<div class="nieuws-titel" style="margin-top: 10px;">&rsaquo;  <strong>Reageer</strong></div>
            	<div class="nieuws-inhoud">
            		<form action="" method="post">
            			<textarea style="height: 100px; width: 300px;" name="bericht" id="bericht" tabindex="2"></textarea><br /><br />
            			<input type="submit" name="submit" value="Verzend" />
            		</form>
            	</div>
    	   <?php
    
    
    }
    
    
    include 'includes/footer.php';
    ?>
    Toon Meer

    [center]HogwartsCastle[/center]

  • NielsB
    Junior (Web)Developer
    Berichten
    948
    • 19 september 2010 om 10:45
    • #2

    misschien klein vraagje, waar word param überhaupt vandaan gehaald?
    waaarschijnlijk geef je het geen waarde of kan hij geen waarde vinden?

    School
    Tweedejaars Informatica Student @ Hogeschool Rotterdam.

    Webtalen
    - PHP ( OOP )
    - SQL
    - JavaScript i.c.m. jQuery framework
    - (x)HTML
    - CSS
    - Actionscript
    - XML

    Programmeertalen
    - Java
    - C#
    - Ruby i.c.m. on Rails framework

Participate now!

Heb je nog geen account? Registreer je nu en word deel van onze community!

Maak een account aan Login

ICT Nieuws

  • Fijne feestdagen

    tcbhome 28 december 2025 om 13:55
  • Kritieke update voor Really Simple Security-plug-in

    K.Rens 16 november 2024 om 16:12
  • ING Nederland streeft naar ondersteuning van Google Pay tegen eind februari

    K.Rens 2 november 2024 om 16:09

Blogs

  • Functioneel ontwerp

    Dees 28 december 2014 om 12:38
  • Access Control List implementatie in PHP/MySQL - deel 1/2

    FangorN 28 december 2018 om 12:35
  • Access Control List implementatie in PHP/MySQL - deel 2/2

    FangorN 29 december 2018 om 12:37
  1. Marktplaats
  2. Design
  3. Voorwaarden
  4. Ons team
  5. Leden
  6. Geschiedenis
  7. Regels
  8. Links
  9. Privacy Policy
ICTscripters ©2005 - 2026 , goedkope hosting door DiMoWeb.com, BE0558.915.582
Sponsors: Beste kattenhotel provincie Antwerpen | Beste Zetes eid kaartlezer webshop
Style: Nexus by cls-design
Stylename
Nexus
Manufacturer
cls-design
Licence
Commercial styles
Help
Supportforum
Visit cls-design