(count($array) - 1) dan?
Kleine Vragen Topic #1
Fass schreef:Waarom die -1?(count($array) - 1) dan?
Sanderc schreef:Wou net te wijzigen maar moest af pc. Kijk. De eerste dig uit array is 0 en de 2de 1. Als er maar 1 ding in array staat dan geeft count 1 en kan er getal tussen 0 en 1 komen wat tussen 0 en 0 moet zijn. Als er 3 dingen in array staan zal het 0 tot 3 zijn wat eigeblijk 0 tot 2 moet zijn. Daarom min 1.Waarom die -1?Eerdere citaten tonen
Fass schreef:(count($array) - 1) dan?
Heel mooi uitgelegd
Ik heb dit weer:
Quote:
Parse error: syntax error, unexpected T_STRING, expecting , or ; in /home/bjarnb43828/justfm.nl/admin/frontend/djsays.php on line 5
Hier kom ik niet uit.
Quote:
Parse error: syntax error, unexpected T_STRING, expecting , or ; in /home/bjarnb43828/justfm.nl/admin/frontend/djsays.php on line 5
[COLOR= #0000BB]<?php[/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/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]functions.php[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]".$get_djzegt[tekst]."[/COLOR][COLOR= #007700];[/COLOR]
?> Hier kom ik niet uit.
^ You got to be fucking kidding me... Kijk naar die echo...
Rik schreef:Die is gewoon goed? Gewoon een variabel die hij moet echoën.^ You got to be fucking kidding me... Kijk naar die echo...
//Laat nu maar, Hij werkt

Bjarnootjuh schreef:Ja, maar dat doe jij dus niet.Die is gewoon goed? Gewoon een variabel die hij moet echoën.Eerdere citaten tonen
Rik schreef:^ You got to be fucking kidding me... Kijk naar die echo...
Hoe kan je ook al weer iets precies in het midden zetten?
text of een divje?
Waarom zet hij niets in de database?
toevoeging op 3 juni 2012, 20:00:42:
[COLOR= #0000BB]<?php[/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][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/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO product (id, naam, prijs, beschrijving, afbeelding)
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]id[/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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]beschrijving[/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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]afbeelding[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]")"[/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]"<form action= method=POST>"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Naam: <input type=text name=naam /><br />"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Prijs <input type=text name=prijs />(enkel een getal)<br />"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Beschrijving <textarea name=beschrijving rows=4 cols=20></textarea><br />"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Afbeelding <input type=text name=afbeelding />(URL bv. http://voorbeeld.be/plaatsje.png)<br />"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<input type=submit value=toevoegen />"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"</form>"[/COLOR][COLOR= #007700];
}[/COLOR]
?> toevoeging op 3 juni 2012, 20:00:42:
Reinier schreef:margin:0 auto;Hoe kan je ook al weer iets precies in het midden zetten?
Is al gelukt:
Zie hier het resultaat:
http://www.theproxybay.nl/
<body>
<br />
<div align="center">
<h1>HEY TIM KUIK <BR /> FOCK JOU </h1>
Even geduld..
</div>
</body> Zie hier het resultaat:
http://www.theproxybay.nl/
Hoe kan ik bij PHP alleen het hoogste id uit de database halen? en laten echoen?
Jordyvc schreef:toevoeging op 3 juni 2012, 20:00:42:Waarom zet hij niets in de database?[COLOR= #0000BB]<?php[/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][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/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO product (id, naam, prijs, beschrijving, afbeelding) 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]id[/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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]beschrijving[/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]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]afbeelding[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]")"[/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]"<form action= method=POST>"[/COLOR][COLOR= #007700];[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Naam: <input type=text name=naam /><br />"[/COLOR][COLOR= #007700];[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Prijs <input type=text name=prijs />(enkel een getal)<br />"[/COLOR][COLOR= #007700];[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Beschrijving <textarea name=beschrijving rows=4 cols=20></textarea><br />"[/COLOR][COLOR= #007700];[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Afbeelding <input type=text name=afbeelding />(URL bv. http://voorbeeld.be/plaatsje.png)<br />"[/COLOR][COLOR= #007700];[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<input type=submit value=toevoegen />"[/COLOR][COLOR= #007700];[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"</form>"[/COLOR][COLOR= #007700]; }[/COLOR] ?>
Reinier schreef:margin:0 auto;Hoe kan je ook al weer iets precies in het midden zetten?
Je wilt 5 dingen toevoegen, maar geeft maar 4 values?
Jordyvc schreef:ORDER BY id DESC LIMIT 1Hoe kan ik bij PHP alleen het hoogste id uit de database halen? en laten echoen?