[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
aan alle goede dingen komt een eind, webmasterplein.net 2003 - 2013
wij danken jullie voor al mooie momenten die dankzij dit forum ontstonden - Derk, Rutger en Stef

Kenmerken in Database

Je komt er niet helemaal uit bij het scripten? Übergoede functie geschreven? Alles met betrekking tot scripting, kun je hier terecht.

Kenmerken in Database

Berichtdoor Weeeyaa » 04 jun 2006 14:31

Avatar gebruiker
Weeeyaa
wmpr
 
Berichten: 2796
Geregistreerd: 10 jul 2004 07:39

Re: Kenmerken in Database

Berichtdoor libia » 04 jun 2006 22:33

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
ola, un cerveza por favor.


of
Avatar gebruiker
libia
wmpr
 
Berichten: 4149
Geregistreerd: 23 okt 2005 14:14
Woonplaats: Alphe!!

Re: Kenmerken in Database

Berichtdoor Weeeyaa » 05 jun 2006 09:24

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
Avatar gebruiker
Weeeyaa
wmpr
 
Berichten: 2796
Geregistreerd: 10 jul 2004 07:39

Re: Kenmerken in Database

Berichtdoor libia » 05 jun 2006 09:37

oke..


daar heb ik dan weer geen verstand van Razz
ola, un cerveza por favor.


of
Avatar gebruiker
libia
wmpr
 
Berichten: 4149
Geregistreerd: 23 okt 2005 14:14
Woonplaats: Alphe!!

Re: Kenmerken in Database

Berichtdoor Weeeyaa » 05 jun 2006 10:05

wel bedankt voor de moeite Smile
Avatar gebruiker
Weeeyaa
wmpr
 
Berichten: 2796
Geregistreerd: 10 jul 2004 07:39

Re: Kenmerken in Database

Berichtdoor libia » 05 jun 2006 10:08

graag gedaan Razz
ola, un cerveza por favor.


of
Avatar gebruiker
libia
wmpr
 
Berichten: 4149
Geregistreerd: 23 okt 2005 14:14
Woonplaats: Alphe!!

Re: Kenmerken in Database

Berichtdoor Robin » 05 jun 2006 13:40

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]
Avatar gebruiker
Robin
wmpr
 
Berichten: 66
Geregistreerd: 29 sep 2005 20:30
Woonplaats: Amsterdam

Re: Kenmerken in Database

Berichtdoor Weeeyaa » 05 jun 2006 14:55

Avatar gebruiker
Weeeyaa
wmpr
 
Berichten: 2796
Geregistreerd: 10 jul 2004 07:39


Keer terug naar PHP, ASP, SQL



cron