Maken

Gestart doorOne2xs21 reacties73 weergaven

22 berichten · pagina 1 van 2

One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
BELONING: 0,1 punt

Kan iemand hierin maken dat je niet minder dan 3 tekens bij beide vakken kan invullen?

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]db_connect.php[/COLOR][COLOR= #007700]);[/COLOR]
?>

[COLOR= #0000BB]<?php
  $qLid[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM gb WHERE gbid = "[/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 id DESC"[/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/while"]while[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$aLid[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$qLid[/COLOR][COLOR= #007700]))
    {[/COLOR] 
     ?>
     <b>Naam:</b> <?=$aLid[naam]?><br />
     <b>Bericht:</b> <?=$aLid[bericht]?>
<hr />
  [COLOR= #0000BB]<?[/COLOR]
  [COLOR= #007700]}[/COLOR] [COLOR= #FF8000]//while afsluiten[/COLOR]
  [URL="http://www.php.net/mysql_free_result"]mysql_free_result[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$qLid[/COLOR][COLOR= #007700]);[/COLOR] 
  ?></table><br /><br />

[COLOR= #0000BB]<?[/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]verzenden[/COLOR][COLOR= #007700]]))
{[/COLOR]
 
[COLOR= #0000BB]$naam[/COLOR] [COLOR= #007700]=[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]));[/COLOR] 
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]]));[/COLOR]  
 
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO gb (gbid, naam, bericht) VALUES ("[/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][COLOR= #0000BB]$naam[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]")"[/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/print"]print[/URL] [COLOR= #DD0000]"<meta http-equiv=refresh content=0 />Toegevoegd..."[/COLOR][COLOR= #007700]; 
  }[/COLOR] 
[URL="http://www.php.net/else"]else[/URL] 
  [COLOR= #007700]{[/COLOR]
  ?>
  <center>
<form action="" method="POST">
<b>Naam:</b> <br><input type="text" name="naam"><br /> 
<b>Bericht:</b> <br><textarea name="bericht"></textarea><br />  
<input type="submit" name="verzenden" value="Verzenden"> 
</form> </center>
[COLOR= #0000BB]<?[/COLOR] 
  [COLOR= #007700]}[/COLOR] 
?>

<center>Er staan <b>[COLOR= #0000BB]<?php




$sql_aantal_berichten[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT id FROM gb WHERE gbid = "[/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]
[COLOR= #0000BB]$aantal_berichten[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_aantal_berichten[/COLOR][COLOR= #007700]);[/COLOR]




[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$aantal_berichten[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR] ?></b> berichten in dit gastenboek.</center>
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
strleng() < 3 toevoegen in een ifstatement

Ik kan het nu niet toevoegen aangezien ik op de iPad ben
0
Thom

Lid

Berichten
10.654
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Zoiets?

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]db_connect.php[/COLOR][COLOR= #007700]);[/COLOR]
?>

[COLOR= #0000BB]<?php
  $qLid[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM gb WHERE gbid = "[/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 id DESC"[/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/while"]while[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$aLid[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$qLid[/COLOR][COLOR= #007700]))
    {[/COLOR] 
     ?>
     <b>Naam:</b> <?=$aLid[naam]?><br />
     <b>Bericht:</b> <?=$aLid[bericht]?>
<hr />
  [COLOR= #0000BB]<?[/COLOR]
  [COLOR= #007700]}[/COLOR] [COLOR= #FF8000]//while afsluiten[/COLOR]
  [URL="http://www.php.net/mysql_free_result"]mysql_free_result[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$qLid[/COLOR][COLOR= #007700]);[/COLOR] 
  ?></table><br /><br />

[COLOR= #0000BB]<?[/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]verzenden[/COLOR][COLOR= #007700]]))
{[/COLOR]
 
 [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/strlen"]strlen[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]) >=[/COLOR] [COLOR= #0000BB]3[/COLOR] [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]
[COLOR= #0000BB]$naam[/COLOR] [COLOR= #007700]=[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]));[/COLOR] 
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] htmlspecialchars[COLOR= #007700]([/COLOR][URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]]));[/COLOR]  
 
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO gb (gbid, naam, bericht) VALUES ("[/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][COLOR= #0000BB]$naam[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]")"[/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/print"]print[/URL] [COLOR= #DD0000]"<meta http-equiv=refresh content=0 />Toegevoegd..."[/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]Naam en/of bericht te lang![/COLOR][COLOR= #007700];
}
  }[/COLOR] 
[URL="http://www.php.net/else"]else[/URL] 
  [COLOR= #007700]{[/COLOR]
  ?>
  <center>
<form action="" method="POST">
<b>Naam:</b> <br><input type="text" name="naam"><br /> 
<b>Bericht:</b> <br><textarea name="bericht"></textarea><br />  
<input type="submit" name="verzenden" value="Verzenden"> 
</form> </center>
[COLOR= #0000BB]<?[/COLOR] 
  [COLOR= #007700]}[/COLOR] 
?>

<center>Er staan <b>[COLOR= #0000BB]<?php




$sql_aantal_berichten[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT id FROM gb WHERE gbid = "[/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]
[COLOR= #0000BB]$aantal_berichten[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_aantal_berichten[/COLOR][COLOR= #007700]);[/COLOR]




[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$aantal_berichten[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR] ?></b> berichten in dit gastenboek.</center>
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Niet minder staat er toch, dan staan je grooter dan teken verkeert
0
Thom

Lid

Berichten
10.654
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Sevvlor schreef:
Niet minder staat er toch, dan staan je grooter dan teken verkeert
Oh.. wacht.. ik raakte even in de war met > en < emo fail

Edit: Maar wacht.. > is toch groter dan en niet minder = dus groter ?
0
Berichten
6.485
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ja, en als de bezoeker het nu fout doet heeft hij geen idee wat er fout gaat. Altijd goeie foutafhandeling!
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Strlen() functie.
En doe wat aan je titel
0
Thom

Lid

Berichten
10.654
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Rogier schreef:
ja, en als de bezoeker het nu fout doet heeft hij geen idee wat er fout gaat. Altijd goeie foutafhandeling!
Wat bedoel je met "fout" ? & heb je t tegen mij of tegen TS? yummie
0
Berichten
11.263
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Kies ook even een normale titel?
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
- Verzin een betere titel
- meta tags voor redirect staan verkeerd
- pas goede foutafhandeling toe!!!!!!!!!!!!!!!
- center in html is oud
- onzinnige lege string op lijn 57
- isset voor formulier post controle is niet de juiste manier!!!!!!!
0
Berichten
11.263
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Zoals Aar zegt,

Maak van dit

<center>Er staan <b>[COLOR= #0000BB]<?php




$sql_aantal_berichten[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT id FROM gb WHERE gbid = "[/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]
[COLOR= #0000BB]$aantal_berichten[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_aantal_berichten[/COLOR][COLOR= #007700]);[/COLOR]




[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$aantal_berichten[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR] ?></b> berichten in dit gastenboek.</center>


Doe die center tags eens weg, is oud. Zet dit in een div en doe dan margin-left en margin-right allebei auto...?
0
Thom

Lid

Berichten
10.654
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Sanderc schreef:
Zoals Aar zegt,

Maak van dit
<center>Er staan <b>[COLOR= #0000BB]<?php




$sql_aantal_berichten[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT id FROM gb WHERE gbid = "[/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]
[COLOR= #0000BB]$aantal_berichten[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_aantal_berichten[/COLOR][COLOR= #007700]);[/COLOR]




[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$aantal_berichten[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR] ?></b> berichten in dit gastenboek.</center>


Doe die center tags eens weg, is oud. Zet dit in een div en doe dan margin-left en margin-right allebei auto...?

Gewoon text-align: center; ? emo
0
Berichten
11.263
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Thommity schreef:
Eerdere citaten tonen
Sanderc schreef:
Zoals Aar zegt,
Maak van dit

<center>Er staan <b>[COLOR= #0000BB]<?php




$sql_aantal_berichten[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT id FROM gb WHERE gbid = "[/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]
[COLOR= #0000BB]$aantal_berichten[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql_aantal_berichten[/COLOR][COLOR= #007700]);[/COLOR]




[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$aantal_berichten[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR] ?></b> berichten in dit gastenboek.</center>


Doe die center tags eens weg, is oud. Zet dit in een div en doe dan margin-left en margin-right allebei auto...?
Gewoon text-align: center; ? emo
Aja, had me even vergist.
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
BUMP, ik heb nog steeds een goede nodig!
0
Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Jellesch schreef:
BUMP, ik heb nog steeds een goede nodig!
Lees Aarclay zn bericht eens emoDaar staat de oplossing in wink
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