Hi,
Ik maak iets waarmee ik gebruikers kan toevoegene in me cms en die kan ik dan permissies geven. Nu haal ik me permissies uit een database en die fetch ik dan.
Voorbeeld:
Nu wil ik dat ik in mijn INSERT query alle opties die je hebt gekozen erin kan zetten. Dus hij moet alles ophalen van welke opties je hebt gekozen.
Hoe doe ik dat?
Alvast bedankt.
Ik maak iets waarmee ik gebruikers kan toevoegene in me cms en die kan ik dan permissies geven. Nu haal ik me permissies uit een database en die fetch ik dan.
Voorbeeld:
<tr>
<td>Permissies (rechten):</td>
<td>
[COLOR= #0000BB]<?php
$permissieQuery[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$mysql[/COLOR][COLOR= #007700]->[/COLOR]query[COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT
id,
permissie
FROM
permissies
WHERE
verwijderd = 0"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$mysql[/COLOR][COLOR= #007700]->[/COLOR]num_rows[COLOR= #007700]([/COLOR][COLOR= #0000BB]$permissieQuery[/COLOR][COLOR= #007700]) >=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$permissieFetch[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$mysql[/COLOR][COLOR= #007700]->[/COLOR]fetch[COLOR= #007700]([/COLOR][COLOR= #0000BB]$permissieQuery[/COLOR][COLOR= #007700]))
{[/COLOR]
?>
<input type="checkbox" name="permissie[]" value="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]entities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$permissieFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]permissie[/COLOR][COLOR= #007700]]);[/COLOR] ?> " /> [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/ucfirst"]ucfirst[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$core[/COLOR][COLOR= #007700]->[/COLOR]entities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$permissieFetch[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]permissie[/COLOR][COLOR= #007700]]));[/COLOR] ?> beheren<br />
[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]Er zijn geen permissies.[/COLOR][COLOR= #007700];
}[/COLOR]
?>
</tr> Nu wil ik dat ik in mijn INSERT query alle opties die je hebt gekozen erin kan zetten. Dus hij moet alles ophalen van welke opties je hebt gekozen.
Hoe doe ik dat?
Alvast bedankt.
