Vragentopic

Gestart doorShahiem15 reacties30 weergaven

16 berichten · pagina 1 van 2

Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb een profiel script en nu als ik een verkeerde id van iemand invul dan geeft hij de melding niet aan dat de gebruiker niet bestata.

Weet iemand waar dat aan ligt.

Code:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]is_auth[COLOR= #007700]([/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/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]act[/COLOR][COLOR= #007700]]) &&[/COLOR]  [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]act[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]edit[/COLOR][COLOR= #007700])
    {[/COLOR]
    ?>
       <div class="top">Profiel wijzige</div>
<div class="mid">
            [COLOR= #0000BB]<?php 
            $InfQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT uMail, uSignature, uSite, uProfileText, uAvatarUrl FROM member_accounts WHERE uId = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]]);[/COLOR]
            [COLOR= #0000BB]$InfFetch[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfQuery[/COLOR][COLOR= #007700]);[/COLOR]
            ?>
            <form name="textbox" action="index.php?p=profiel_edit" method="POST">
                <br /><br />
                <strong> Huidig wachtwoord (indien van toepassing) </strong><br />
                <input type="password" name="current_password"><br />
                <br />
                <strong> Nieuw wachtwoord (indien van toepassing) </strong><br />
                <input type="password" name="new_password"><br />
                <br />
                <strong> Nieuw wachtwoord herhalen (indien van toepassing) </strong><br />
                <input type="password" name="new_password_confirm"><br />
                <br />
                <strong> Emailadres </strong><br />
                <input type="text" name="email" value="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uMail[/COLOR][COLOR= #007700]]);[/COLOR] ?>"><br />
                <br />
                [COLOR= #0000BB]<?php[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] ubb[COLOR= #007700]([/COLOR][COLOR= #DD0000]textbox[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]signature[/COLOR][COLOR= #007700]);[/COLOR]
                ?>
                <strong> Signature </strong><br />
                <textarea name="signature" cols="70" rows="10">[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uSignature[/COLOR][COLOR= #007700]]);[/COLOR] ?></textarea><br />
                <br />
                [COLOR= #0000BB]<?php[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] ubb[COLOR= #007700]([/COLOR][COLOR= #DD0000]textbox[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]text[/COLOR][COLOR= #007700]);[/COLOR]
                ?>
                <strong> Profiel informatie </strong>
                <textarea cols="70" rows="10" id="text" name="text">[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uProfileText[/COLOR][COLOR= #007700]]);[/COLOR] ?></textarea><br /><br />
                <strong>Site </strong><br />
                <input type="text" name="site" value="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/stristr"]stristr[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uSite[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #DD0000]http://[/COLOR][COLOR= #007700]) ?[/COLOR] [COLOR= #DD0000][/COLOR] [COLOR= #007700]:[/COLOR] [COLOR= #DD0000]http://[/COLOR][COLOR= #007700]) .[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uSite[/COLOR][COLOR= #007700]]);[/COLOR] ?>" /><br /><br />
                <strong> Profielafbeelding </strong><br />
                <input type="text" name="avatar" value="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uAvatarUrl[/COLOR][COLOR= #007700]]);[/COLOR] ?>" /><br /><br />
                <input type="submit" name="submit" value="Sla veranderingen op" />
            </form>
        </div>
    [COLOR= #0000BB]<?php[/COLOR]   
    [COLOR= #007700]}[/COLOR]   
    [URL="http://www.php.net/else"]else[/URL]
    [COLOR= #007700]{[/COLOR]
      
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/ctype_digit"]ctype_digit[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]))
        {[/COLOR]
            [COLOR= #0000BB]$InfQuery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT uName, uCoins, uLast, uRef, uRangN, uCol, uSite, uProfileText, uSignature, uAvatarUrl, uPosts, uRegDate, uWarns FROM member_accounts WHERE uId = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]);[/COLOR]
            [COLOR= #0000BB]$InfAssoc[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfQuery[/COLOR][COLOR= #007700]);[/COLOR]
            [COLOR= #0000BB]$total_coin[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_result"]mysql_result[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT SUM(uCoins) FROM member_accounts"[/COLOR][COLOR= #007700]),[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]);[/COLOR]
            [COLOR= #0000BB]$total_post[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_result"]mysql_result[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT COUNT(1) FROM forum_posts"[/COLOR][COLOR= #007700]),[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]);[/COLOR]
            [COLOR= #0000BB]$percentage_of_coins[/COLOR] [COLOR= #007700]= (([/COLOR][URL="http://www.php.net/round"]round[/URL][COLOR= #007700](([/COLOR][COLOR= #0000BB]$InfAssoc[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uCoins[/COLOR][COLOR= #007700]][/COLOR] / [COLOR= #0000BB]$total_coin[/COLOR][COLOR= #007700]),[/COLOR] [COLOR= #0000BB]4[/COLOR][COLOR= #007700])) *[/COLOR] [COLOR= #0000BB]100[/COLOR][COLOR= #007700]);[/COLOR]
            [COLOR= #0000BB]$percentage_of_total[/COLOR] [COLOR= #007700]= (([/COLOR][URL="http://www.php.net/round"]round[/URL][COLOR= #007700](([/COLOR][COLOR= #0000BB]$InfAssoc[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uPosts[/COLOR][COLOR= #007700]][/COLOR] / [COLOR= #0000BB]$total_post[/COLOR][COLOR= #007700]),[/COLOR] [COLOR= #0000BB]4[/COLOR][COLOR= #007700])) *[/COLOR] [COLOR= #0000BB]100[/COLOR][COLOR= #007700]);[/COLOR]
            
                        
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="top">Profiel van [/COLOR][COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfAssoc[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uName[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]</div>
<div class="mid">[/COLOR][COLOR= #007700];[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="aangeven">Is dit Profiel ongepast? Meld het dan <a href="index.php?p=aangeven&amp;act=profiel&amp;id=[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]"><b>hier</b></a>, we gaan het dan aanpasen</div>[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfAssoc[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uAvatarUrl[/COLOR][COLOR= #007700]]))
            {[/COLOR]
             
               [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div style="float: right;">[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] image_resize[COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfAssoc[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uAvatarUrl[/COLOR][COLOR= #007700]]);[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]</div>[/COLOR][COLOR= #007700];
            }[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div style="float: left;">[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<img src="http://habbo.nl/habbo-imaging/avatarimage?size=b&direction=2&head_direction=2&gesture=sml&action=drk=6&user=[/COLOR] [COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfAssoc[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uName[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]&img_format=gif" alt="" />[/COLOR][COLOR= #007700];[/COLOR]
 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]</div>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<strong><font color="#787878">Habboregio info</font></strong><br />[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<strong>Gebruikersnaam:&nbsp;</strong> <span style="color:[/COLOR][COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfAssoc[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uCol[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000];">[/COLOR] [COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfAssoc[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uName[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]</span>&nbsp;<a href="index.php?p=private_mes&amp;act=write&amp;user=[/COLOR] [COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]"><img src="./img/new_pb.png" alt="Stuur [/COLOR] [COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfAssoc[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uName[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000] een privebericht" title="Stuur [/COLOR] [COLOR= #007700].[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfAssoc[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uName[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000] een privebericht" /></a><br />[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<strong>Blox</strong> [/COLOR][COLOR= #007700].[/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfAssoc[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uCoins[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000] <i>([/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$percentage_of_coins[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]% van iedereen)</i><br />[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<strong>Rang</strong> [/COLOR][COLOR= #007700].[/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfAssoc[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uRangN[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]<br />
            <strong>Waarschuwingen:</strong><br />
            <div style="width: 100px; border: 1px solid #000000; height: 20px; margin-left: 65px;""><div style="background-color: #00aaff; width: [/COLOR][COLOR= #007700].[/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfAssoc[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uWarns[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]px; height: 20px;"></div></div>
        </div>
        
        <div class="top">Gastenboek</div>
        <div class="mid">[/COLOR][COLOR= #007700];[/COLOR]
            [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]is_auth[COLOR= #007700]([/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/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]toevoegen[/COLOR][COLOR= #007700]]) &&[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]POST[/COLOR][COLOR= #007700]) {[/COLOR]
                    [URL="http://www.php.net/if"]if[/URL][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]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]Je hebt niet alle velden ingevuld.[/COLOR][COLOR= #007700];
                    }[/COLOR]
                    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700])
                    {[/COLOR]
                        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO gastenboek ( bericht, userid) VALUES ( "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][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]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]" ) "[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/trigger_error"]trigger_error[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
                        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="greenerror">Je bericht is succesvol toevoegd.</div><meta http-equiv="refresh" content="3; URL=index.php" />[/COLOR][COLOR= #007700];
                    }
                }[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<form method="post">
                    <textarea name="bericht" style="width: 95%; height: 200px;"></textarea><br />                    
                    <input type="submit" name="toevoegen" value="Voeg toe!" />
                </form>[/COLOR][COLOR= #007700];
            }[/COLOR]
            [COLOR= #0000BB]$querys[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT b.bericht, m.uName FROM gastenboek AS b, member_accounts AS m WHERE m.uId = b.userid AND b.userid = "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]" ORDER BY b.id DESC LIMIT 0,8"[/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/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$querys[/COLOR][COLOR= #007700]) >=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700])
            {[/COLOR]
                [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$querys[/COLOR][COLOR= #007700]))
                {[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] ParseUbb[COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]1[/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]Je gastenboek is leeg[/COLOR][COLOR= #007700];
            }[/COLOR]    
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]</div><br />
            
            <div class="top">Groot profiel</div>
            <div class="mid">
                [/COLOR][COLOR= #007700].(![/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfAssoc[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uProfileText[/COLOR][COLOR= #007700]]) ?[/COLOR] ParseUbb[COLOR= #007700]([/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$InfAssoc[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uProfileText[/COLOR][COLOR= #007700]]),[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) :[/COLOR] [COLOR= #DD0000]Heey allemaal,<br />Hier kan je een eigen tekst neerzetten over jezelf, zoals hobbys, interreses, leeftijd,<br />Dit kan je wijzigen door te gaan naar Leden -> Profiel wijzigen[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]
            </div>
            
            <div class="top_black">Mijn badges</div>
            <div class="mid">
                <span style="color: #787878;">Badges krijg je door een bepaalde rang te hebben, en als je mee doet aan<br /> competities en activiteiten op onze website of in het Hotel.</style><br /><br />[/COLOR][COLOR= #007700];[/COLOR]
                [COLOR= #0000BB]$querys[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT b.id, b.plaatje, b.beschrijving, m.uName FROM badgesysteem b, member_accounts m WHERE m.uId = b.userid AND b.userid = "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]" ORDER BY b.id DESC LIMIT 0,8"[/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/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$querys[/COLOR][COLOR= #007700]) >[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
                {[/COLOR]
                    [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$querys[/COLOR][COLOR= #007700]))
                    {[/COLOR]
                        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<a href="index.php?p=badges&id=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"><img src="[/COLOR][COLOR= #007700].[/COLOR]htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]plaatje[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]" /></a>[/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]Deze gebruiker heeft op dit moment geen badges[/COLOR][COLOR= #007700];
                }[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]</div>[/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]<div class="rederror">U heeft een ongeldig id opgegegeven, of de gebruiker bestaat niet</div>[/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]<div class="rederror">U moet ingelogd zijn om te profielen te bekijken. <a href="index.php?p=login">Log hier in</a> of <a href="index.php?p=registreer">maak een account aan.</a></div>[/COLOR][COLOR= #007700];    
}[/COLOR]
?>
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je checkt nergens met mysql_num_rows() of de gebruiker wel bestaat.
Als je dat doet dan geeft ie aan of de gebruiker wel of niet bestaat
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dankjewel Luuksmile
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nu heb een andere vraag.
Ik in de profiel script een gastenboek gemaakt maar als ik bijvoorbeeld op iemand anders zijn profiel een bericht stuurt dan komt het in mijn eigen profiel

Code

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]is_auth[COLOR= #007700]([/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/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]toevoegen[/COLOR][COLOR= #007700]]) &&[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]POST[/COLOR][COLOR= #007700]) {[/COLOR]
                    [URL="http://www.php.net/if"]if[/URL][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]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]Je hebt niet alle velden ingevuld.[/COLOR][COLOR= #007700];
                    }[/COLOR]
                    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700])
                    {[/COLOR]
                        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO gastenboek ( bericht, userid) VALUES ( "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][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]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]" ) "[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/trigger_error"]trigger_error[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
                        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="greenerror">Je bericht is succesvol toevoegd.</div><meta http-equiv="refresh" content="3; URL=index.php" />[/COLOR][COLOR= #007700];
                    }
                }[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<form method="post">
                    <textarea name="bericht" style="width: 95%; height: 200px;"></textarea><br />                    
                    <input type="submit" name="toevoegen" value="Voeg toe!" />
                </form>[/COLOR][COLOR= #007700];
            }[/COLOR]
            [COLOR= #0000BB]$querys[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT b.bericht, m.uName FROM gastenboek AS b, member_accounts AS m WHERE m.uId = b.userid AND b.userid = "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]" ORDER BY b.id DESC LIMIT 0,8"[/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/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$querys[/COLOR][COLOR= #007700]) >=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700])
            {[/COLOR]
                [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$querys[/COLOR][COLOR= #007700]))
                {[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] ParseUbb[COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]1[/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]Je gastenboek is leeg[/COLOR][COLOR= #007700];
            }[/COLOR]    
?>
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
wil je dat de gebruikersnaam van de gebruiker die het bericht plaatst erbij komt te staan of niet?
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dat ook maar als ik in iemand anders zijn Gastenboek een bericht plaats dan krijg ik de bericht die ik heb geplaatst in mijn gastenboek terwijl het in die andere zijjn Gasten boek moet emo
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Mag ik een dump van de tabel gastenboek (zonder data)?
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
-- phpMyAdmin SQL Dump
-- version 3.2.3
-- http://www.phpmyadmin.net
--
-- Machine: localhost
-- Genereertijd: 18 Dec 2009 om 20:31
-- Serverversie: 5.1.40
-- PHP-Versie: 5.2.11

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `shahiem_hr`
--

-- --------------------------------------------------------

--
-- Tabelstructuur voor tabel `gastenboek`
--

CREATE TABLE IF NOT EXISTS `gastenboek` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `bericht` mediumtext NOT NULL,
  `userid` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;

--
-- Gegevens worden uitgevoerd voor tabel `gastenboek`
--
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
voeg in de tabel gastenboek een veld gastenboek_id toe (int(11))

de code wordt dan:

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR]is_auth[COLOR= #007700]([/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/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]toevoegen[/COLOR][COLOR= #007700]]) &&[/COLOR] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]POST[/COLOR][COLOR= #007700]) {[/COLOR]
                    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]]))
                    {[/COLOR]
                        [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]Je hebt niet alle velden ingevuld.[/COLOR][COLOR= #007700];
                    }[/COLOR]
                    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700])
                    {[/COLOR]
                        [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"
                        INSERT INTO
                            gastenboek
                            (
                                bericht,
                                userid,
                                gastenboek_id
                            )
                        VALUES
                            (
                                "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][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]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]",
                                "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]"
                            )
                        "[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/trigger_error"]trigger_error[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
                        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="greenerror">Je bericht is succesvol toevoegd.</div><meta http-equiv="refresh" content="3; URL=index.php" />[/COLOR][COLOR= #007700];
                    }
                }[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<form method="post">
                    <textarea name="bericht" style="width: 95%; height: 200px;"></textarea><br />                    
                    <input type="submit" name="toevoegen" value="Voeg toe!" />
                </form>[/COLOR][COLOR= #007700];
            }[/COLOR]
            [COLOR= #0000BB]$querys[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"
            SELECT
                b.bericht,
                m.uName
            FROM
                gastenboek AS b,
                member_accounts AS m
            WHERE
                m.uId = b.userid
            AND
                b.gastenboek_id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]"
            ORDER BY
                b.id DESC
            LIMIT
                0,8
            "[/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/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$querys[/COLOR][COLOR= #007700]) >[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
            {[/COLOR]
                [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$querys[/COLOR][COLOR= #007700]))
                {[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] ParseUbb[COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]1[/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]Je gastenboek is leeg[/COLOR][COLOR= #007700];
            }[/COLOR]    
?>
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dankjewel Luuksmile
Nog een vraag (Hoop dat je me niet lastig vind xd):

Ik heb een contact form en als je die invult gaat het automatisch naar een Admin n zijn Priveberichten.

Maar de berichten komen bij siteberichten en dat wil ik niet en hij moet ook de naam weergeven van de Poster: Dus de Habbonaam.

Code:

[COLOR= #0000BB]<?php[/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]submit[/COLOR][COLOR= #007700]])) {[/COLOR]
                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]antwoord[/COLOR][COLOR= #007700]]) ||[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]habbonaam[/COLOR][COLOR= #007700]]) ||[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]))
                {[/COLOR]
                 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="rederror"><br /><strong>Je hebt niet alle velden ingevuld</strong></div>[/COLOR][COLOR= #007700];
                }[/COLOR]
                [URL="http://www.php.net/else"]else[/URL]
                [COLOR= #007700]{[/COLOR]
  [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO member_messages (MesBy, MesFor, MesText, MesTitle, MesDate) VALUES ("[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]habbonaam[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]", 1, "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]antwoord[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]", Verlotingen aanmelding, NOW())"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/trigger_error"]trigger_error[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="greenerror"><br /><strong>Bedankt voor je antwoord, Binnenkort worden de winnaar bekend gemaakt.</strong></div><meta http-equiv="refresh" content="3; URL=index.php" />[/COLOR][COLOR= #007700];
            }
        }[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]

<form action="" method="post">
            <table width="100%">
                <tr>
                    <td>Antwoord:</td>
                    <td><input type="text" name="antwoord" /></td>
                </tr>
                <tr>
                    <td>Habbonaam:</td>
                    <td><input type="text" name="habbonaam" /></td>
                </tr>
 <tr>
                    <td>Emailadres:</td>
                    <td><input type="text" name="email" /></td>
                </tr>
                <tr>
                    <td></td>
                    <td><input type="submit" name="submit" value="Toevoegen" /></td>
                </tr>
            </table>
        </form>[/COLOR][COLOR= #007700];[/COLOR]
   
?>
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Komt omdat ze dan van userid 0 afkomen en dan automatisch in siteberichten gaan.
Kan ik dus weinig aan doen
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nog een vraag Luuk.
Ik probeerde een paginanavigatie in te bouwen maar dat lukt niet.
Kan jij dat voor me doen dat er maar 2 berichten op 1 pagina kan?

Code:

if(is_auth(1, $_SESSION[uId]))
            {
                if(isset($_POST[toevoegen]) && $_SERVER[REQUEST_METHOD] == POST) {
                    if(empty($_POST[bericht]))
                    {
                        echo <div class="rederror"><br /><strong>Je hebt niet alle velden ingevuld.</strong></div>;
                    }
                    if($fouten == )
                    {
                        mysql_query("
                        INSERT INTO
                            gastenboek
                            (
                                bericht,
                                userid,
                                gastenboek_id
                            )
                        VALUES
                            (
                                " . mysql_real_escape_string($_POST[bericht]) . ",
                                " . $_SESSION[uId] . ",
                                " . mysql_real_escape_string($_GET[id]) . "
                            )
                        ") or trigger_error(mysql_error());
                        echo <div class="greenerror"><strong>Je bericht is succesvol toevoegd.</strong></div>;
                    }
                }
}
            $querys = mysql_query("
            SELECT
                b.bericht,
                m.uName
            FROM
                gastenboek AS b,
                member_accounts AS m
            WHERE
                m.uId = b.userid
            AND
                b.gastenboek_id = " . mysql_real_escape_string($_GET[id]) . "
            ORDER BY
                b.id DESC
            LIMIT
                0,8
            ") or die(mysql_error());
            if(mysql_num_rows($querys) > 0)
            {
                while($row = mysql_fetch_assoc($querys))
                {
echo <div class="top">Gastenboek</div>
        <div class="mid"><div style="float: right; padding-right:180px;"><strong>;


echo htmlentities($row[uName]);
echo </strong><br />;
                    echo ParseUbb($row[bericht], 1);

echo </div>;
}
}

                echo 

<div style="float: left;"><form method="post">
                    <textarea name="bericht" style="width: 95%; height: 200px;"></textarea><br />                    
                    <input type="submit" name="toevoegen" value="Voeg toe!" />
                </form></div>;
                        }
            else
            {
                echo Je gastenboek is leeg;
            }
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Heb ik nu ff niet zo veel zin in. Ik doe het morgen of straks wel
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Is goed, Doe maar rustig aan smile
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Even als reactie op dit:
http://www.one2xs.com/threads/8766#126476

Je probeerd een naam in een intveld te stoppen?

MesBy = Int
$_POST[habbonaam] = String

En buiten dat stuur je het naar gebruiker 1 (MesFor = 1)
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