Scripter!

Gestart doorMaartenl0 reacties52 weergaven

1 berichten · pagina 1 van 1

Maartenl

Lid · Topicstarter

Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hallo,

Omdat ik wat punten nodig heb zoek ik een opdracht. Ik wil geen super grote opdracht omdat ik ook klaar moet raken met alles voor school.

Ik kan :
PHP
HTML
JavaScript ( enkel jQuery)
CSS -> deels
Ik kan mysqli & mysql gebruiken
Bij interesse : een PBtje

Voorbeeld :
Dit is een stukje van mijn blogsysteem
Spoiler tonen
[COLOR= #0000BB]<?[/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/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]))
{[/COLOR]
    [COLOR= #0000BB]$blogQuery[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$mysql[/COLOR][COLOR= #007700]->[/COLOR]query[COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM blogs WHERE naam="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$mysql[/COLOR][COLOR= #007700]->[/COLOR]real_escape_string[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
    [COLOR= #0000BB]$blog[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$blogQuery[/COLOR][COLOR= #007700]->[/COLOR]fetch_assoc[COLOR= #007700]();[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$blog[/COLOR] [COLOR= #007700]==[/COLOR] null[COLOR= #007700])
    {[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]De blog is niet gevonden![/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL]
    [COLOR= #007700]{[/COLOR]
        boven[COLOR= #007700]([/COLOR][COLOR= #DD0000]Blog - [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$blog[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$datum[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]-[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$blog[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]date[/COLOR][COLOR= #007700]]);[/COLOR]
        [COLOR= #0000BB]$countReactiesQuery[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$mysql[/COLOR][COLOR= #007700]->[/COLOR]query[COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM blog_reacties WHERE blog_id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$blog[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
        [COLOR= #0000BB]$countReacties[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$countReactiesQuery[/COLOR][COLOR= #007700]->[/COLOR]num_rows[COLOR= #007700];[/COLOR]
        ?>
        <h1>[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$blog[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]];[/COLOR] ?></h1><div style="text-align:right;">[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$datum[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]/[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$datum[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]2[/COLOR][COLOR= #007700]];[/COLOR] ?></div>
        <br />
        [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/nl2br"]nl2br[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$blog[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]]);[/COLOR] ?>
        <hr />
        <div style="background: url(http://cdn1.iconfinder.com/data/icons/quartz/Comment.png) no-repeat;width:64px;height:64px;padding-left:24px;padding-top:16px;float:left;"><b>[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$countReacties[/COLOR][COLOR= #007700];[/COLOR] ?></b></div><!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style" style="float:left;">
<br /><a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4f6f65f25b1fb45b"></script>
<!-- AddThis Button END -->
        [COLOR= #0000BB]<?[/COLOR]
        [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$reactie[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$countReactiesQuery[/COLOR][COLOR= #007700]->[/COLOR]fetch_assoc[COLOR= #007700]())
        {[/COLOR]
            ?>
            <table width="100%">
                <tr>
                    <td><i>[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/ucfirst"]ucfirst[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$reactie[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]);[/COLOR] ?> zei :</i></td>
                    <td style="text-align:right;width:100px;">[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$reactie[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]date[/COLOR][COLOR= #007700]];[/COLOR] ?></td>
                </tr>
                <tr>
                    <td width="100%">[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/nl2br"]nl2br[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$reactie[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]]);[/COLOR] ?></td>
                    <td></td>
                </tr>
            </table>
            [COLOR= #0000BB]<?[/COLOR]
        [COLOR= #007700]}[/COLOR]
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"POST"[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]])
        {[/COLOR]
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]reageer[/COLOR][COLOR= #007700]]))
            {[/COLOR]
                [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000][/COLOR] or [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000][/COLOR] or [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700])
                {[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Vul alle velden in aub![/COLOR][COLOR= #007700];
                }[/COLOR]
                [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]]) <[/COLOR] [COLOR= #0000BB]3[/COLOR][COLOR= #007700])
                {[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Uw bericht is te kort![/COLOR][COLOR= #007700];
                }[/COLOR]
                [URL="http://www.php.net/else"]else[/URL]
                [COLOR= #007700]{[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Uw reactie is geplaatst![/COLOR][COLOR= #007700];[/COLOR]
                    [COLOR= #0000BB]$mysql[/COLOR][COLOR= #007700]->[/COLOR]query[COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO blog_reacties (naam,bericht,ip,date,blog_id,email) VALUES ("[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$mysql[/COLOR][COLOR= #007700]->[/COLOR]real_escape_string[COLOR= #007700]([/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]])).[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$mysql[/COLOR][COLOR= #007700]->[/COLOR]real_escape_string[COLOR= #007700]([/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]])).[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]", NOW(), "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$blog[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$mysql[/COLOR][COLOR= #007700]->[/COLOR]real_escape_string[COLOR= #007700]([/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]])).[/COLOR][COLOR= #DD0000]")"[/COLOR][COLOR= #007700]);
                }
            }
        }[/COLOR]
        [URL="http://www.php.net/else"]else[/URL]
        [COLOR= #007700]{[/COLOR]
            ?>
            <br />
            <br />
            Plaats een reactie!
            <form method="post" action="">
            <input type="text" name="naam" placeholder="Naam..." />
            <br />
            <input type="text" name="email" placeholder="Email..." />
            <br />
            <textarea style="width:100%;height:200px;" name="bericht" placeholder="Bericht..."></textarea>
            <br />
            <input type="submit" value="Reageer" name="reageer" />
            </form>
            [COLOR= #0000BB]<?[/COLOR]
        [COLOR= #007700]}[/COLOR]
        onder[COLOR= #007700]();
    }
}[/COLOR]
?>
Groetjes, Maarten
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren