[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/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 - formuliertje in if else lus
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

formuliertje in if else lus

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

formuliertje in if else lus

Berichtdoor Weeeyaa » 10 jun 2006 08:04

Ik zou graag een formuliertje maken in een if else lus.
hoe moet dit, ik heb al geprobeerd om php in de lus te sluiten, het formuliertje te maken en php weer te openen, maar dat werkt niet.

wie weet hoe dit wel kan?

dit is de bedoeling:

[code="php"]if(iets)
{
echo "verwijderen?";
<form>
<input type="submit" value="ja"> <input type="submit" value="nee">
</form>
}

else
{
echo "snap je? ";
}
[/code]
alvast bedankt,

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

Re: formuliertje in if else lus

Berichtdoor KillerSponge » 10 jun 2006 08:35

[code="php"]<?
if (blaat)
{
?>
formulier
<?
}
else
{
?>
dit zou gewoon moeten werken
<?
}
?>[/code]
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: formuliertje in if else lus

Berichtdoor Weeeyaa » 10 jun 2006 08:40

dan ga ik dat toch nog eens proberen Smile

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

Re: formuliertje in if else lus

Berichtdoor Weeeyaa » 10 jun 2006 08:56

ja nou jij het zo zegt werkt het wel Smile bedankt!

ik heb nu het volgende, het cotroleerd eerst of er een id in de url staat, als dat zo is dan echot hij dat formulier, maar klik je op Ja, en verwijdert hij niets wat wel de bedoeling is.

hoe kan dat?

[code="php"]// het daatwerkelijke deleten
$delete_id = $_GET['delete'];

if(isset($delete_id))
{
echo "<br />weet u zeker dat u deze persoon wilt verwijderen uit de database?<br />";
?>
<form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
<input type="submit" value="Ja" name="delete_ja"> <input type="submit" value="nee" name="delete_nee">
</form>
<?php

if(isset($delete_ja))
{
$sql = "DELETE FROM gegevens WHERE id=$delete_id";
$query = mysql_query($sql) or die("Er is iets mig gegaan tijdens het verwijderen van de persoon.<br />
Klik <a herf=\"verwijder.php\">hier</a> om terug te gaan.");
}

else
{
echo "";
}
}

else
{
echo "<br />Klik op de link \"Delete\" om de persoon te verwijderen uit uw database.<br />";
}
[/code]

de variable van het formulier heb ik makkelijker geschreven naar $delete_ja en $delete_nee. ik hoop dat je er wijs uit word Wink

alvast bedankt,

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

Re: formuliertje in if else lus

Berichtdoor Weeeyaa » 18 jun 2006 12:44

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

Re: formuliertje in if else lus

Berichtdoor KillerSponge » 18 jun 2006 13:20

Je moet $delete_ja wel met $_POST['delete_ja'] aanroepen Wink
Blabla en andere onzin - http://killersponge.nl
Avatar gebruiker
KillerSponge
Beheerder
Beheerder
 
Berichten: 14456
Geregistreerd: 24 aug 2004 13:05

Re: formuliertje in if else lus

Berichtdoor Weeeyaa » 18 jun 2006 16:30

ik heb in de file config.php die ik iets hoger include:

$delete_ja = $_POST['delete_ja'];

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

Re: formuliertje in if else lus

Berichtdoor Robin » 18 jun 2006 16:46

Laat hem achter
[code="php"]
if(isset($delete_ja))
{
[/code]
iets echoën, om te kijken of $delete_ja het doet...
Avatar gebruiker
Robin
wmpr
 
Berichten: 66
Geregistreerd: 29 sep 2005 20:30
Woonplaats: Amsterdam

Re: formuliertje in if else lus

Berichtdoor Weeeyaa » 18 jun 2006 16:54

ga ik proberen bedankt

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


Keer terug naar PHP, ASP, SQL



cron