Kleine Vragen Topic #1

Gestart doorLennard4.284 reacties15.585 weergaven

4.285 berichten · pagina 33 van 286

Berichten
4.451
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
zoiets?

[COLOR= #0000BB]<?php
$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM tickets WHERE 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]c[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]


[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]==[/COLOR] false[COLOR= #007700]) 
{[/COLOR]
    [COLOR= #FF8000]// mysql error[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]A database error occured[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL] 
[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]$query[/COLOR][COLOR= #007700])) {[/COLOR]
    
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="datum">
            <span>
                [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]  [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achternaam[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]
            </span>
            
            schreef op: [/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datum[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000], om [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]tijd[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]
          </div>[/COLOR][COLOR= #007700];[/COLOR]
          [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]
          <div style="border-bottom: 1px solid #000; margin: 0 auto;"></div>[/COLOR][COLOR= #007700];
    
    }
          
}[/COLOR]
?>


en dan c=1
dan krijg je ticket 1,
of als je het wilt doen per ticket:

[COLOR= #0000BB]<?php
$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM tickets WHERE ticket = "[/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]c[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]


[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]==[/COLOR] false[COLOR= #007700]) 
{[/COLOR]
    [COLOR= #FF8000]// mysql error[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]A database error occured[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL] 
[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]$query[/COLOR][COLOR= #007700])) {[/COLOR]
    
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="datum">
            <span>
                [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]  [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achternaam[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]
            </span>
            
            schreef op: [/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datum[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000], om [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]tijd[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]
          </div>[/COLOR][COLOR= #007700];[/COLOR]
          [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]
          <div style="border-bottom: 1px solid #000; margin: 0 auto;"></div>[/COLOR][COLOR= #007700];
    
    }
          
}[/COLOR]
?>


maar hierbij laat hij wel maar 1 ding zien omdat elke code uniek is
0
Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bartv schreef:
zoiets?

[COLOR= #0000BB]<?php
$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM tickets WHERE 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]c[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]


[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]==[/COLOR] false[COLOR= #007700]) 
{[/COLOR]
    [COLOR= #FF8000]// mysql error[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]A database error occured[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL] 
[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]$query[/COLOR][COLOR= #007700])) {[/COLOR]
    
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="datum">
            <span>
                [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]  [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achternaam[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]
            </span>
            
            schreef op: [/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datum[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000], om [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]tijd[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]
          </div>[/COLOR][COLOR= #007700];[/COLOR]
          [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]
          <div style="border-bottom: 1px solid #000; margin: 0 auto;"></div>[/COLOR][COLOR= #007700];
    
    }
          
}[/COLOR]
?>
en dan c=1
dan krijg je ticket 1,
of als je het wilt doen per ticket:

[COLOR= #0000BB]<?php
$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM tickets WHERE ticket = "[/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]c[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]


[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR] [COLOR= #007700]==[/COLOR] false[COLOR= #007700]) 
{[/COLOR]
    [COLOR= #FF8000]// mysql error[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]A database error occured[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL] 
[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]$query[/COLOR][COLOR= #007700])) {[/COLOR]
    
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div class="datum">
            <span>
                [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]  [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achternaam[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]
            </span>
            
            schreef op: [/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]datum[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000], om [/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]tijd[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]
          </div>[/COLOR][COLOR= #007700];[/COLOR]
          [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]
          <div style="border-bottom: 1px solid #000; margin: 0 auto;"></div>[/COLOR][COLOR= #007700];
    
    }
          
}[/COLOR]
?>


maar hierbij laat hij wel maar 1 ding zien omdat elke code uniek is

Nope hij laat niks zien.

toevoeging op 22 juni 2012, 12:34:03:
THANKS HIJ WERKTbiggrin
0
Berichten
6.356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hoe kan ik in een variable een stukje dikgedrukt maken?
Aangezien ik daarmee een email verzend.

$tekst = allerlei tekstjes door elkaar heen

En stel, ik wil het woord tekstjes dikgedrukt maken.
Hoe doe ik dat dan? kan het niet op internet vinden.
0
Thom

Lid

Berichten
10.654
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Mikeb schreef:
Hoe kan ik in een variable een stukje dikgedrukt maken?
Aangezien ik daarmee een email verzend.

$tekst = allerlei tekstjes door elkaar heen

En stel, ik wil het woord tekstjes dikgedrukt maken.
Hoe doe ik dat dan? kan het niet op internet vinden.
gewoon met html?
0
Berichten
6.356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja dat snap ik ook wel yummie maar werkt niet. yummie
0
Berichten
4.451
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php
$variabel[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]Dit is een stuk tekst, <strong>en dit is dik gedrukt</strong>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$variabel[/COLOR][COLOR= #007700];[/COLOR]
?>


Zo
0
Berichten
6.356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nee, het wordt een mailtje.

$van = "$afzendermail";
$to = $_POST[email];
$ow = "Bestelling";
$inh = "Geachte heer/mevrouw en nog veel meer tekst";
$success = mail($to, $ow, $inh, "From: <$van>");


En dan staat er in de mail: blabla
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
HTML-header meegeven
0
Berichten
1.684
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Wie kent er een Nederlandse site of boek om JDBC te leren?
0
Berichten
1.579
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hallow,

Ben bezig met een cookie login systeem..
Het werkt lekker alleen bij het uitloggen loop ik vast:

[COLOR= #0000BB]<?php[/COLOR]
    [URL="http://www.php.net/setcookie"]setcookie[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"id"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"/"[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/setcookie"]setcookie[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"username"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"/"[/COLOR][COLOR= #007700]);[/COLOR]
?>


Error:

Warning: Cannot modify header information - headers already sent by (output started at C:xampphtdocsdataincludescontentnieuw10.php:10) in C:xampphtdocsloguit.php on line 30

Warning: Cannot modify header information - headers already sent by (output started at C:xampphtdocsdataincludescontentnieuw10.php:10) in C:xampphtdocsloguit.php on line 31


Raadsel ook waarom die nieuw10 erbij pakt die heeft helemaal niks met het script te maken en de cookies.

Ik heb ook een class aangemaakt die kijkt als bestaat zoniet verwijder alles.. Die werkt wel maar uitloggen werkt niet schater
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Robertt schreef:
Hallow,

Ben bezig met een cookie login systeem..
Het werkt lekker alleen bij het uitloggen loop ik vast:
[COLOR= #0000BB]<?php[/COLOR]
    [URL="http://www.php.net/setcookie"]setcookie[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"id"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"/"[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/setcookie"]setcookie[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"username"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"/"[/COLOR][COLOR= #007700]);[/COLOR]
?>


Error:

Warning: Cannot modify header information - headers already sent by (output started at C:xampphtdocsdataincludescontentnieuw10.php:10) in C:xampphtdocsloguit.php on line 30

Warning: Cannot modify header information - headers already sent by (output started at C:xampphtdocsdataincludescontentnieuw10.php:10) in C:xampphtdocsloguit.php on line 31


Raadsel ook waarom die nieuw10 erbij pakt die heeft helemaal niks met het script te maken en de cookies.

Ik heb ook een class aangemaakt die kijkt als bestaat zoniet verwijder alles.. Die werkt wel maar uitloggen werkt niet schater
Er mag niets geechoot worden voor een setcookie functie. Ook geen whitespace.
0
Berichten
1.579
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Antonn schreef:
Eerdere citaten tonen
Robertt schreef:
Hallow,
Ben bezig met een cookie login systeem..
Het werkt lekker alleen bij het uitloggen loop ik vast:

[COLOR= #0000BB]<?php[/COLOR]
    [URL="http://www.php.net/setcookie"]setcookie[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"id"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"/"[/COLOR][COLOR= #007700]);[/COLOR]
        [URL="http://www.php.net/setcookie"]setcookie[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"username"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"/"[/COLOR][COLOR= #007700]);[/COLOR]
?>


Error:

Warning: Cannot modify header information - headers already sent by (output started at C:xampphtdocsdataincludescontentnieuw10.php:10) in C:xampphtdocsloguit.php on line 30

Warning: Cannot modify header information - headers already sent by (output started at C:xampphtdocsdataincludescontentnieuw10.php:10) in C:xampphtdocsloguit.php on line 31


Raadsel ook waarom die nieuw10 erbij pakt die heeft helemaal niks met het script te maken en de cookies.

Ik heb ook een class aangemaakt die kijkt als bestaat zoniet verwijder alles.. Die werkt wel maar uitloggen werkt niet schater
Er mag niets geechoot worden voor een setcookie functie. Ook geen whitespace.

Oja natuurlijk! Moet ook niet tot zo laat gaan scripten -.- Danku!
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Je moet ook geen id meegeven in een cookie, dit kunnen mensen dan aanpassen via hun browser.
Als je een ID meegeeft doe je zoiets in een $_SESSION
0
Berichten
1.579
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Raaoul schreef:
Je moet ook geen id meegeven in een cookie, dit kunnen mensen dan aanpassen via hun browser.
Als je een ID meegeeft doe je zoiets in een $_SESSION

Wat geef jij altijd mee, is eigelijk voor eerst dat met cookies werk. Moet het zeker via DB gaan doen? Kwa checks en alles? Gebruiks trouwens de cookies niet om dingen weer te geven om te site maar alleen om te kijken als gegevens klopen zo niet uitloggen.
0
Jvdw

Lid

Berichten
4.321
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
heeft iemand een simpel script waarmee ik tweets vanaf mijn website postbiggrin
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