[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Webmasterplein.net • Toon onderwerp - Kenmerken in Database
Pagina 1 van 1

Kenmerken in Database

BerichtGeplaatst: 04 jun 2006 14:31
door Weeeyaa

Re: Kenmerken in Database

BerichtGeplaatst: 04 jun 2006 22:33
door libia
de php:

<?php
$optiea = $_GET['optiea'];
$optieb = $_GET['optieb'];
$optiec = $_GET['optiec'];

if(isset($optiea)){
echo "hij koos als kenmerk Optie A";
}
elseif(isset($optieb)){
echo "hij koos als kenmerk Optie B";
}
else{
echo "hij koos als kenmerk Optie C";
}
?>


het formulier:

<form method="get" action="de_pagina.php" name="fomulier">
<input type="radio" name="optiea" value="Optie A">
<input type="radio" name="optieb" value="Optie B">
<input type="radio" name="optiec" value="Optie C">
<input type="submit" value="verzenden">
</form>




met type="radio" krijg je keuze rondjes, zodat er maar een kan worden aangevinkt! Very Happy

Re: Kenmerken in Database

BerichtGeplaatst: 05 jun 2006 09:24
door Weeeyaa
Bedankt, maar ik zou het graag eerst naar een database schrijven en dan uit de database lezen...

dus als je optie a aanvinkt en verstuurt moet in de rij "kenmerken" in de tabel optie a komen te staan.
zodat ik straks SELECT * FROM tabelnaam WHERE kenmerk='optiea'

Thijs

Re: Kenmerken in Database

BerichtGeplaatst: 05 jun 2006 09:37
door libia
oke..


daar heb ik dan weer geen verstand van Razz

Re: Kenmerken in Database

BerichtGeplaatst: 05 jun 2006 10:05
door Weeeyaa
wel bedankt voor de moeite Smile

Re: Kenmerken in Database

BerichtGeplaatst: 05 jun 2006 10:08
door libia
graag gedaan Razz

Re: Kenmerken in Database

BerichtGeplaatst: 05 jun 2006 13:40
door Robin
Als ik het goed snap wil je dus dit:
[code="php"]
<?php
if($optiea == "on")
{
$sql = mysql_query("INSERT INTO Kenmerken VALUES(\"optiea\")");
// Als $optiea aan staan insert hij optiea in de database
}
else if($optieb == "on")
{
$sql = mysql_query("INSERT INTO Kenmerken VALUES(\"optieb\")");
// Als $optieb aan staan insert hij optieb in de database
}
else if($optiec == "on")
{
$sql = mysql_query("INSERT INTO Kenmerken VALUES(\"optiec\")");
// Als $optieb aan staan insert hij optieb in de database
}
?>[/code]

Re: Kenmerken in Database

BerichtGeplaatst: 05 jun 2006 14:55
door Weeeyaa