Kleine Vragen Topic #1

Gestart doorLennard4.284 reacties15.585 weergaven

4.285 berichten · pagina 141 van 286

Berichten
7.806
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nu echoot hij niks sadley
toevoeging op 20 oktober 2012, 17:02:04:
Dit heb ik:

[COLOR= #0000BB]<?php
$klantnaam[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR]
    [COLOR= #DD0000]"0007"[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]"knip"[/COLOR][COLOR= #007700],
    );[/COLOR]


[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]klantid[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]0007[/COLOR][COLOR= #007700]){[/COLOR]
?>
Welkom, [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$klantnaam[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]klantid[/COLOR][COLOR= #007700]]];[/COLOR] ?>
[COLOR= #0000BB]<?php[/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]De opgegeven klanten ID is niet gevonden, als u denkt dat niet klopt, neem dan contact met ons op![/COLOR][COLOR= #007700];
}[/COLOR]
?>


Maar hij echoot niet sadley
0
Berichten
6.485
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
regel 3:

array values defineer je met "=>"
0
Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
//Al opgelost
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bjarnootjuh schreef:
Nu echoot hij niks sadley
toevoeging op 20 oktober 2012, 17:02:04:
Dit heb ik:

[COLOR= #0000BB]<?php
$klantnaam[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR]
    [COLOR= #DD0000]"0007"[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]"knip"[/COLOR][COLOR= #007700],
    );[/COLOR]


[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]klantid[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]0007[/COLOR][COLOR= #007700]){[/COLOR]
?>
Welkom, [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$klantnaam[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]klantid[/COLOR][COLOR= #007700]]];[/COLOR] ?>
[COLOR= #0000BB]<?php[/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]De opgegeven klanten ID is niet gevonden, als u denkt dat niet klopt, neem dan contact met ons op![/COLOR][COLOR= #007700];
}[/COLOR]
?>


Maar hij echoot niet sadley
Hij MOET gwn een van de 2 tonen, of een error. Je krijgt zowiezo wel iets, en wat is dat?
0
Berichten
7.307
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Rogier schreef:
layout midden:

Maak een div container en geef die een margin: 0 auto en width: 800px (oid).Zet daarbinnen je layout.

lettertype: Google is yout best friend, meestal cufon oid.
toevoeging op 20 oktober 2012, 12:37:18:
Desire schreef:
Eerdere citaten tonen
Rogier schreef:
database veld "rang" heeft niet de waarde 1,2 of 3?
Of de query wordt neit goed uitgevoerd. Doe eens wat debugging biggrin
Hoeemo
Bijvoorbeeld de uitkomst van de query te print_r en.

Dankje, het is inderdaad uiteindelijk met Cufon gelukt.
0
Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hmm hoe doe ik via preg_match dat je geen of iets dergelijks bij je gebruikersnaam mag invullen. Dat je alleen tekst mag doen. Ik heb nu dit, maar daar klopt niks van.

[COLOR= #0000BB]<?php[/COLOR]

[COLOR= #007700]function[/COLOR] isValidNAAM[COLOR= #007700]([/COLOR][COLOR= #0000BB]$gebruikersnaam[/COLOR][COLOR= #007700])
{[/COLOR]
    [URL="http://www.php.net/return"]return[/URL] [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]@^(?:abcdefghijklmnopqrstuvwxyz)?([^/]+)@i[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$gebruikersnaam[/COLOR][COLOR= #007700]);
}[/COLOR]
?>
0
Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Rogier schreef:
Eerdere citaten tonen
Dylanh schreef:
Eerdere citaten tonen
Gamedealer schreef:
<input type="text" value="Troll" disabled="disabled">
Thanks
dit had je heel erg goed zelf kunnen googlen...

Dat deed ik ook, maar ik deed type="disabled" i.p.v disabled="disabled"
0
Lennard

Lid · Topicstarter

Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Bjarnootjuh schreef:
Nu echoot hij niks sadley
toevoeging op 20 oktober 2012, 17:02:04:
Dit heb ik:

[COLOR= #0000BB]<?php
$klantnaam[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR]
    [COLOR= #DD0000]"0007"[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]"knip"[/COLOR][COLOR= #007700],
    );[/COLOR]


[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]klantid[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]0007[/COLOR][COLOR= #007700]){[/COLOR]
?>
Welkom, [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$klantnaam[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]klantid[/COLOR][COLOR= #007700]]];[/COLOR] ?>
[COLOR= #0000BB]<?php[/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]De opgegeven klanten ID is niet gevonden, als u denkt dat niet klopt, neem dan contact met ons op![/COLOR][COLOR= #007700];
}[/COLOR]
?>


Maar hij echoot niet sadley
Je hebt een gare server want hij verbergt fouten, en als er iets is wat je niet wil dan is het wel fouten verbergen.
Doe eens dit bovenaan zetten:
ini_set(display_errors, 1);
error_reporting(E_ALL);

als het goed is krijg je dan te zien dat je == niet klopt in je array declaratie.
0
Berichten
7.806
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hij werkt al worshippy
toevoeging op 20 oktober 2012, 18:38:51:
Had == ipv =>
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Desire schreef:
Hmm hoe doe ik via preg_match dat je geen of iets dergelijks bij je gebruikersnaam mag invullen. Dat je alleen tekst mag doen. Ik heb nu dit, maar daar klopt niks van.
[COLOR= #0000BB]<?php[/COLOR]

[COLOR= #007700]function[/COLOR] isValidNAAM[COLOR= #007700]([/COLOR][COLOR= #0000BB]$gebruikersnaam[/COLOR][COLOR= #007700])
{[/COLOR]
    [URL="http://www.php.net/return"]return[/URL] [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]@^(?:abcdefghijklmnopqrstuvwxyz)?([^/]+)@i[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$gebruikersnaam[/COLOR][COLOR= #007700]);
}[/COLOR]
?>



Zal zowiezo niet werken.

Je kan wel tegen XSS beveiligen met de htmlentities functie, maar dat doe je beter pas bij de output. Als je wilt dat de gebruiker alleen nummers en letters kan invullen bij de gebruikersnaam moet je heel even Googlen en heb je t meteen.
0
Berichten
7.307
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Quote:
Document Outline

Below is an outline for this document, automatically generated from the heading tags (

through

.)
[H2] Welkom op onze website
If this does not look like a real outline, it is likely that the heading tags are not being used properly. (Headings should reflect the logical structure of the document; they should not be used simply to add emphasis, or to change the font size.)
If you want to examine the semantic structure of your documents, beyond the outline, try the Semantic data extractor.

Quote:
No Character encoding declared at document level

No character encoding information was found within the document, either in an HTML meta element or an XML declaration. It is often recommended to declare the character encoding in the document itself, especially if there is a chance that the document will be read from or saved to disk, CD, etc.

See this tutorial on character encoding for techniques and explanations.

Quote:
No Character Encoding Found! Falling back to windows-1252.

None of the standards sources gave any information on the character encoding labeling for this document. Without encoding information it is impossible to reliably validate the document. As a fallback solution, the "windows-1252" encoding was used to read the content and attempt to perform the validation, but this is likely to fail for all non-trivial documents.

Before defaulting to windows-1252 the validator also tried to read the content with the following encoding(s), without success: UTF-8.

Read the FAQ entry on character encoding for more details and pointers on how to fix this problem with your document.

Die 3 warnings krijg ik als ik mijn layout lat validaten. What to do?
0
Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Antonn schreef:
Eerdere citaten tonen
Desire schreef:
Hmm hoe doe ik via preg_match dat je geen of iets dergelijks bij je gebruikersnaam mag invullen. Dat je alleen tekst mag doen. Ik heb nu dit, maar daar klopt niks van.
[COLOR= #0000BB]<?php[/COLOR]

[COLOR= #007700]function[/COLOR] isValidNAAM[COLOR= #007700]([/COLOR][COLOR= #0000BB]$gebruikersnaam[/COLOR][COLOR= #007700])
{[/COLOR]
    [URL="http://www.php.net/return"]return[/URL] [URL="http://www.php.net/preg_match"]preg_match[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]@^(?:abcdefghijklmnopqrstuvwxyz)?([^/]+)@i[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$gebruikersnaam[/COLOR][COLOR= #007700]);
}[/COLOR]
?>

Zal zowiezo niet werken.

Je kan wel tegen XSS beveiligen met de htmlentities functie, maar dat doe je beter pas bij de output. Als je wilt dat de gebruiker alleen nummers en letters kan invullen bij de gebruikersnaam moet je heel even Googlen en heb je t meteen.

Heb het zo opgelost:

if(!preg_match(/^[a-z-]+$/i, $_POST[gebruikersnaam]))

Thanks
0
Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ben bezig met de Scouting website van hier, alleen kom ik niet verder met de htaccess

Options MultiViews FollowSymLinks
RewriteEngine On
ErrorDocument 404 /404

RewriteRule ^speltakken/(.*)/(.*) /getSpeltakFile?speltak=$1&url=$2 
RewriteRule ^speltakken/(.*) /getSpeltakFile?speltak=$1

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /getSiteFile?url=$1


Die onderste RewriteRule werkt gewoon goed, alleen die bovenste 2 werken niet goed, krijg de hele tijd een 404
0
Berichten
11.263
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hoe centreer ik mijn textarea; zo lukt het niet:

<input type="text" style="margin-left:auto;margin-right:auto;" placeholder="Wachtwoord">
0
Berichten
4.367
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
css:
input["type=text"]{
margin: 0 auto;
}
Sanderc schreef:
Hoe centreer ik mijn textarea; zo lukt het niet:
<input type="text" style="margin-left:auto;margin-right:auto;" placeholder="Wachtwoord">
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