Jump to content

senca99

Members
  • Posts

    40
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

senca99's Achievements

Member

Member (2/5)

0

Reputation

  1. Thank you for your reply. That was the method I had in my head to but it looks so unsafe to me. Is there any way to overcome this? A safer way only using php and mysql? When I think about it I can't see any other way than the traditional one. Even with the use of Joomla, WordPress,... there still has to be a loginform and a database so doesn't that mean this also is the traditional way of doing things?
  2. Hey, I was having some trouble in finding the logic in this: I have a login form (php) and a mySQL database storing the username and password. Problem is that my database is also protected because logically you don't want username's and/or passwords to be public. This means that when someone tries the login form, it is impossible to check if he has correct credentials because this would imply that the db password should be used also to grant access to the database. How to overcome this issue?
  3. I am sorry for not including the file names. The first file is registratie_gezin_kids.php The second one is a php file containing some functions (like the form) called functies_voor_registraties.php The third page is registratie_gezin.php registratie_gezin_kids.php lets you select the amout of children you have. It is the first page that is shown. After submitting, you get redirected towards registratie_gezin.php where you will get the form that is inside functies_voor_registraties.php. I hope this makes it a bit clearer? edit: I tried testing every input with isset() but it then jumps immediately to the else structure instead of showing the form in the if part.
  4. Hey, I have a first php page containing a dropdown menu form. Submitting this form redirects to a new php page containing a bigger form with input fields. This form works as a charm when the page is loaded (without a submit e.a.) but when redirected the checks on this form are done immediatelly with the result that when you proceed to this page, all the errors are there which is not the idea. How can I make the errors dissapear until a first submit of this second form? I've been trying with submit check and isset but that iliminates my errors and doesn't show them anymore. first page(the small drop down menu form which will redirect to the bigger form): <?php include("header.php"); include("functies_voor_registraties.php"); echo '<p>Gelieve eerst hieronder het aantal kinderen te selecteren:</p>'; echo' <form method="post" action="registratie_gezin.php"> <p>Ik heb: <br /> <select name="aantalkids" id="aantalkids"> <option value=1 $een>1 kind</option> <option value=2 $twee>2 kinderen</option> <option value=3 $twee>3 kinderen</option> <option value=4 $twee>4 kinderen</option> <option value=5 $twee>5 kinderen</option> </select> </p> <p> '; form_knoppen(); include("footer.php"); ?> 2nd page(the actual big form which will be called at the 3rd page: see below): <?php function algemeen_registratie_formulier() { echo'<p>Registreer</p>'; $familienaam=''; $voornaam=''; $straat=''; $huisnr=''; $postcode=''; $plaats=''; $mail=''; $telnr=''; $paswoord=''; $bijzonderh=''; $aantalkids=''; // Speciale checks voor familienaam,voornaam,straat,plaats en e-mailadres wordt gedaan als we het form submitten if ($_SERVER['REQUEST_METHOD'] == 'POST') { if(isset($_POST['naam'])){ $familienaam=$_POST['naam'];} if(isset($_POST['vnaam'])){ $voornaam=$_POST['vnaam'];} if(isset($_POST['straat'])){ $straat=$_POST['straat'];} if(isset($_POST['huisnr'])){ $huisnr=$_POST['huisnr'];} if(isset($_POST['postcode'])){ $postcode=$_POST['postcode'];} if(isset($_POST['plaats'])){ $plaats=$_POST['plaats'];} if(isset($_POST['mail'])){ $mail=$_POST['mail'];} if(isset($_POST['telnr'])){ $telnr=$_POST['telnr'];} if(isset($_POST['paswoord'])){ $paswoord=$_POST['paswoord'];} $bijzonderh= $_POST['bijzonderh']; /*Hieronder de regexen om de input te verifiëren*/ if (!ereg('^[ a-zA-Z-]+$', $_POST['naam'])){ $familienaam_fout = 1;} if (!ereg('^[ a-zA-Z-]+$', $voornaam)){ $voornaam_fout = 1;} if (!ereg('^[ a-zA-Z-]+$', $straat)){ $straat_fout = 1;} if (!ereg("/^[0-9]{1,3}[a-z]{0,1}$/i", $huisnr)){ $huisnr_fout = 1;} if (!ereg('^[1-9][0-9]{3}$', $postcode)){ $postcode_fout = 1;} if (!ereg('^[ a-zA-Z-]+$', $plaats)) $plaats_fout = 1; if (function_exists('filter_var') && !filter_var($mail, FILTER_VALIDATE_EMAIL)) $email_fout = 1; if (!ereg('^0[1-9][0-9]{7}$', $telnr)) $telnr_fout = 1; if (!ereg('^[a-zA-Z0-9]+$', $paswoord)) $paswoord_fout = 1; if (!empty($_POST['bijzonderh'])){ if(!ereg('^\W+', $bijzonderh)){ $bijzonderh_fout = 1; } } $bijzonderh_fout = 1; } // Kijk of alle velden zijn ingevuld - //voornaam en familienaam,straat en plaats mag alleen uit letters bestaan //en het e-mailadres moet juist zijn...wordt gechecked bij submit if (($_SERVER['REQUEST_METHOD'] == 'POST' && (empty($_POST['naam']) || !empty($familienaam_fout) || empty($_POST['vnaam']) || !empty($voornaam_fout)|| empty($_POST['straat']) || !empty($straat_fout) || empty($_POST['postcode']) || !empty($postcode_fout) || empty($_POST['telnr']) || !empty($telnr_fout) || empty($_POST['plaats']) || !empty($plaats_fout) || empty($_POST['mail']) || !empty($email_fout))) || $_SERVER['REQUEST_METHOD'] == 'GET') { if (!empty($voornaam_fout)) echo '<p>U vulde geen of een foute voornaam in.</p>'; if (!empty($familienaam_fout)) echo '<p>U vulde geen of een foute familienaam in.</p>'; if (!empty($straat_fout)) echo '<p>U vulde geen of een foute straatnaam in.</p>'; if (!empty($huisnr_fout)) echo '<p>U vulde een ongeldig huisnummer in.</p>'; if (!empty($postcode_fout)) echo '<p>Uw postcode mag enkel uit 4 cijfers bestaan.</p>'; if (!empty($plaats_fout)) echo '<p>U vulde geen plaats in.</p>'; if (!empty($email_fout)) echo '<p>U vulde geen e-mail adres in.</p>'; if (!empty($telnr_fout)) echo '<p>U vulde een ongeldig telefoonnummer in (enkel 9 cijfers toegestaan).</p>'; if (!empty($paswoord_fout)) echo '<p>Een paswoord moet minstens 1 hoofdletter bevatten en mintens 1 cijfer en mag GEEN speciale tekens bevatten.</p>'; if (!empty($bijzonderh_fout)) echo '<p>U koos ervoor een optionele mededeling te plaatsen maar het is nie just!</p>'; echo' <form method="post" action="' . $_SERVER['REQUEST_URI'] . '"> <p>Vul je voornaam in: <br /> <input type="text" value="' .$voornaam. '" name="vnaam" /> </p> <p>Vul je naam in: <br /> <input type="text" value="' .$familienaam. '" name="naam" /> </p> <p>Straat: <br /> <input type="text" value="' .$straat. '" name="straat" /> </p> <p>Huisnummer: <br /> <input type="text" value="' .$huisnr. '" name="huisnr" /> </p> <p>Postcode: <br /> <input type="text" value="' .$postcode. '" name="postcode" /> </p> <p>Stad: <br /> <input type="text" value="' .$plaats. '" name="plaats" /> </p> <p>E-mail: <br /> <input type="text" value="' .$mail. '" name="mail" /> </p> <p>TELnr(enkel cijfers!): <br /> <input type="text" value="' .$telnr. '" name="telnr" /> </p> <p>Paswoord(minstens 1 hoofdletter, 1 cijfer en GEEN speciale tekens: <br /> <input type="text" value="' .$paswoord. '" name="paswoord" /> </p> <p>*Opmerkingen of bijzonderheden: <br /> <input type="text" value="' .$bijzonderh. '" name="bijzonderh" /> </p> </p> '; } else{ $current_url = $_SERVER['PHP_SELF']; if($current_url == "/tweedekans/registratie_gezin.php"){ echo' U heeft zich geregistreerd met de volgende gegevens: Naam + voornaam: '; echo $familienaam, $voornaam; echo'Adres: '; echo $straat, $huisnr, $postcode, $plaats; echo' <p>Vul hieronder de namen en geboortedata van uw kinderen in:</p> '; $times=$_POST['aantalkids']; $kind1=''; $kind2=''; $kind3=''; $kind4=''; $kind5=''; $devalues = array(1 => $kind1, 2 => $kind2, 3 => $kind3, 4 => $kind4, 5 => $kind5); echo ' <form method="post" action="' . $_SERVER['REQUEST_URI'] . '"> '; for($i=1; $i<=$times; $i++) { echo ' <p>Naam '; echo $i; echo 'e kind: <br /> <input type="text" value="' .$devalues[$i]. ' " name="naamkind'.$i.'" /> </p> '; } } else{ echo 'here the form will be handled for DB and stuff...' } } } function form_knoppen(){ echo' <p> <input type="submit" value="Verzenden" /> <input type="reset" value="Wissen" /> </p> </form>'; } ?> The next code is the second page where the bigger form will be called: <?php include("header.php"); include("functies_voor_registraties.php"); algemeen_registratie_formulier(); form_knoppen(); include("footer.php"); ?>
  5. Does any one know if there is a possibility to ignore the first form when it is correctly submitted? I still don't get why at first you can submit the first form and the right values are remembered until a correct form submission is done, but from the moment you get to a second form, the form data from the first one still exist but aren't filled in in the form anymore. :s. The code: <?php function algemeen_registratie_formulier($familienaam,$voornaam,$straat,$huisnr,$postcode,$plaats,$mail,$telnr,$paswoord,$bijzonderh,$aantalkids) { $check=0; echo'<p>Registreer</p>'; $familienaam=''; $voornaam=''; $straat=''; $huisnr=''; $postcode=''; $plaats=''; $mail=''; $telnr=''; $paswoord=''; $bijzonderh=''; $aantalkids=''; // Speciale checks voor familienaam,voornaam,straat,plaats en e-mailadres wordt gedaan als we het form submitten if ($_SERVER['REQUEST_METHOD'] == 'POST') { $familienaam=$_POST['naam']; $voornaam=$_POST['vnaam']; $straat=$_POST['straat']; $huisnr=$_POST['huisnr']; $postcode=$_POST['postcode']; $plaats=$_POST['plaats']; $mail=$_POST['mail']; $telnr=$_POST['telnr']; $paswoord=$_POST['paswoord']; $bijzonderh= $_POST['bijzonderh']; /*Hieronder de regexen om de input te verifiëren*/ if (!ereg('^[ a-zA-Z-]+$', $_POST['naam'])){ $familienaam_fout = 1;} if (!ereg('^[ a-zA-Z-]+$', $_POST['vnaam'])){ $voornaam_fout = 1;} if (!ereg('^[ a-zA-Z-]+$', $_POST['straat'])){ $straat_fout = 1;} if (!ereg("/^[0-9]{1,3}[a-z]{0,1}$/i", $_POST['huisnr'])){ $huisnr_fout = 1;} if (!ereg('^[1-9][0-9]{3}$', $_POST['postcode'])){ $postcode_fout = 1;} if (!ereg('^[ a-zA-Z-]+$', $_POST['plaats'])) $plaats_fout = 1; if (function_exists('filter_var') && !filter_var($_POST['mail'], FILTER_VALIDATE_EMAIL)) $email_fout = 1; if (!ereg('^0[1-9][0-9]{7}$', $_POST['telnr'])) $telnr_fout = 1; if (!ereg('^[a-zA-Z0-9]+$', $_POST['paswoord'])) $paswoord_fout = 1; if (!empty($_POST['bijzonderh'])){ if(!ereg('^\W+', $_POST['bijzonderh'])){ $bijzonderh_fout = 1; } } $bijzonderh_fout = 1; } // Kijk of alle velden zijn ingevuld - //voornaam en familienaam,straat en plaats mag alleen uit letters bestaan //en het e-mailadres moet juist zijn...wordt gechecked bij submit if (($_SERVER['REQUEST_METHOD'] == 'POST' && (empty($_POST['naam']) || !empty($familienaam_fout) || empty($_POST['vnaam']) || !empty($voornaam_fout)|| empty($_POST['straat']) || !empty($straat_fout) || empty($_POST['postcode']) || !empty($postcode_fout) || empty($_POST['telnr']) || !empty($telnr_fout) || empty($_POST['plaats']) || !empty($plaats_fout) || empty($_POST['mail']) || !empty($email_fout))) || $_SERVER['REQUEST_METHOD'] == 'GET') { if (!empty($voornaam_fout)) echo '<p>U vulde geen of een foute voornaam in.</p>'; if (!empty($familienaam_fout)) echo '<p>U vulde geen of een foute familienaam in.</p>'; if (!empty($straat_fout)) echo '<p>U vulde geen of een foute straatnaam in.</p>'; if (!empty($huisnr_fout)) echo '<p>U vulde een ongeldig huisnummer in.</p>'; if (!empty($postcode_fout)) echo '<p>Uw postcode mag enkel uit 4 cijfers bestaan.</p>'; if (!empty($plaats_fout)) echo '<p>U vulde geen plaats in.</p>'; if (!empty($email_fout)) echo '<p>U vulde geen e-mail adres in.</p>'; if (!empty($telnr_fout)) echo '<p>U vulde een ongeldig telefoonnummer in (enkel 9 cijfers toegestaan).</p>'; if (!empty($paswoord_fout)) echo '<p>Een paswoord moet minstens 1 hoofdletter bevatten en mintens 1 cijfer en mag GEEN speciale tekens bevatten.</p>'; if (!empty($bijzonderh_fout)) echo '<p>U koos ervoor een optionele mededeling te plaatsen maar het is nie just!</p>'; echo' <form method="post" action="' . $_SERVER['REQUEST_URI'] . '"> <p>Vul je voornaam in: <br /> <input type="text" value="' .$voornaam. '" name="vnaam" /> </p> <p>Vul je naam in: <br /> <input type="text" value="' .$familienaam. '" name="naam" /> </p> <p>Straat: <br /> <input type="text" value="' .$straat. '" name="straat" /> </p> <p>Huisnummer: <br /> <input type="text" value="' .$huisnr. '" name="huisnr" /> </p> <p>Postcode: <br /> <input type="text" value="' .$postcode. '" name="postcode" /> </p> <p>Stad: <br /> <input type="text" value="' .$plaats. '" name="plaats" /> </p> <p>E-mail: <br /> <input type="text" value="' .$mail. '" name="mail" /> </p> <p>TELnr(enkel cijfers!): <br /> <input type="text" value="' .$telnr. '" name="telnr" /> </p> <p>Paswoord(minstens 1 hoofdletter, 1 cijfer en GEEN speciale tekens: <br /> <input type="text" value="' .$paswoord. '" name="paswoord" /> </p> <p>*Opmerkingen of bijzonderheden: <br /> <input type="text" value="' .$bijzonderh. '" name="bijzonderh" /> </p> </p> '; $current_url = $_SERVER['PHP_SELF']; if($current_url == "/tweedekans/registratie_gezin.php"){ kies_aantal_kids(); } } else{ $current_url = $_SERVER['PHP_SELF']; if($current_url == "/tweedekans/registratie_gezin.php"){ echo' U heeft zich geregistreerd met de volgende gegevens: Naam + voornaam: '; echo $naam, $voornaam; echo'Adres: '; echo $straat, $huisnr, $postcode, $plaats; echo' <p>Vul hieronder de namen en geboortedata van uw kinderen in:</p> '; $times=$_POST['aantalkids']; $kind1=''; $kind2=''; $kind3=''; $kind4=''; $kind5=''; $devalues = array(1 => $kind1, 2 => $kind2, 3 => $kind3, 4 => $kind4, 5 => $kind5); echo ' <form method="post" action="' . $_SERVER['REQUEST_URI'] . '"> '; for($i=1; $i<=$times; $i++) { echo ' <p>Naam '; echo $i; echo 'e kind: <br /> <input type="text" value="' .$devalues[$i]. ' " name="naamkind'.$i.'" /> </p> '; } } else{ echo 'Beste babysitter, u registratie zal nu afgehandelt worden!'; } } } function form_knoppen(){ echo' <p> <input type="submit" value="Verzenden" /> <input type="reset" value="Wissen" /> </p> </form>'; } function kies_aantal_kids(){ echo' <p>Ik heb: <br /> <select name="aantalkids" id="aantalkids"> <option value=1 $een>1 kind</option> <option value=2 $twee>2 kinderen</option> <option value=3 $twee>3 kinderen</option> <option value=4 $twee>4 kinderen</option> <option value=5 $twee>5 kinderen</option> </select> </p> '; } ?>
  6. One big problem...the second form comes up the way it should BUT! the form header is again reguest_uri because this form has to be checked for errors as well but this means that on submitting the second form for checks the whole php page is being reloaded including the first form and not the second one. :s. What a bummer :s
  7. To clarify myself: When submitting a correct form (when you reach the else), a new miniform will appear. How many fields it will show depends on a dropdown menu in the first form. Also the other form values(from the first form) are used after the second form is filled in. Everything from form 1 and 2 will be stored in database. I thought that when the first form was filled in correctly and you went to the second form, that the values of the first form would be lost. But apparently they aren't because I just checked and it worked. I don't get it, how is it possible to retrieve my data after the form is submitted?
  8. Hey all! I'm kinda stuck on this one. I've got a form with checks in a function. But when the form is filled in correctly I wan't to retrieve its data but is that possible? In pseudocode it looks like this: if(form isn't filled in correctly){ show the form again } else{ use the values for something else } The form action is a $_SERVER['request_uri'] . Which means that when reaching the 'else' I'm still on the same page but I need to retrieve the form data. Could someone point me in the right direction and is that even possible?
  9. Sorry for the late reply, I totally lost trach of this one! I tried what you said but I still get the notices. I changed the functionheader like this: function algemeen_registratie_formulier($familienaam,$voornaam,$straat,$huisnr,$postcode,$plaats,$mail,$telnr,$paswoord,$bijzonderh,$aantalkids) and I referenced them: algemeen_registratie_formulier(&$familienaam,&$voornaam,&$straat,&$huisnr,&$postcode,&$plaats,&$mail,&$telnr,&$paswoord,&$bijzonderh,&$aantalkids); Does it have something to do with the fact that the page is reloaded before showing the form? I first show a dropdown menu and when submitting the choice, the function is called and shows the form.
  10. Sorry if I wasn't clear. The line I gave was kindoff a pseudoregex. The bottomline is that it has to check for one of 6 possible combinations. For instance a person could live at number 66. The regex should check wether it is a valid housenumber according to the 6 possible combinations of ints and a char I gave. Thats why I used OR's to try and clearify what I ment. I guess in ugly terms that would give a pseudoregex like this: ^[1-9]$ OR ^[1-9][0-9]$ OR ^[1-9][0-9]{2}$ OR ^[1-9][A-Za-z]$ OR ^[1-9][0-9][A-Za-z]$ OR ^[1-9][0-9]{2}[A-Za-Z]$ I'm hoping that makes it more clear.
  11. Thats not quite what I ment. The user input is only one of the 6 possibilities. They don't have to be what I wrote down but it just has to be int(s) that can be followed by a char. The user input is a housenumber. That could be any of the 6 combinations I wrote down. Characters stands for the mailbox number in flats.
  12. Hey everyone! I can do some basic regexing but I don't really have a clue for this one. I want to create a regex that checks a user inputfield and it can only be this: 4 34 535 4a 55C 997G Only these 6 matches, an int, 2 ints, 3 ints, 1 int and a char, 2 ints and a char or 3 ints and a char. Not minding caps but it cannot be more then these 6. Something like "anintORtwointsORthreeintsORoneintandacharOR..." you get the point . The OR's are bugging me because I can't find a single line regex for it. Can anyone help me out?
  13. Hey all! I've written code for checking form input and it works fine if its just a php script. But for OO reasons I wanted to put the code in a function. But when calling the function in a different script suddenly I get notices that my variables in the function are undefined. :s Does anyone know why? This is the function code: function algemeen_registratie_formulier() { echo'<p>Registreer</p>'; $familienaam=''; $voornaam=''; $straat=''; $huisnr=''; $postcode=''; $plaats=''; $mail=''; $telnr=''; $bijzonderh=''; $aantalkids=''; // Speciale checks voor familienaam,voornaam,straat,plaats en e-mailadres wordt gedaan als we het form submitten if ($_SERVER['REQUEST_METHOD'] == 'POST') { $familienaam=$_POST['naam']; $voornaam=$_POST['vnaam']; $straat=$_POST['straat']; $huisnr=$_POST['huisnr']; $postcode=$_POST['postcode']; $plaats=$_POST['plaats']; $mail=$_POST['mail']; $telnr=$_POST['telnr']; $bijzonderh= $_POST['bijzonderh']; /*Hieronder de regexen om de input te verifiëren*/ if (!ereg('^[ a-zA-Z-]+$', $_POST['naam'])){ $familienaam_fout = 1;} if (!ereg('^[ a-zA-Z-]+$', $_POST['vnaam'])){ $voornaam_fout = 1;} if (!ereg('^[ a-zA-Z-]+$', $_POST['straat'])){ $straat_fout = 1;} if ((!ereg('[1-9][A-Za-z]',$_POST['huisnr'])) && (!ereg('[1-9][0-9]{3}', $_POST['huisnr']))){ $huisnr_fout = 1;} if (!ereg('^[1-9][0-9]{3}$', $_POST['postcode'])){ $postcode_fout = 1;} if (!ereg('^[ a-zA-Z-]+$', $_POST['plaats'])) $plaats_fout = 1; if (function_exists('filter_var') && !filter_var($_POST['mail'], FILTER_VALIDATE_EMAIL)) $email_fout = 1; if (!ereg('^0[1-9][0-9]{7}$', $_POST['telnr'])) $telnr_fout = 1; /* if (!empty($_POST['bijzonderh'])){ if(){ } } $bijzonderh_fout = 1; */ } // Kijk of alle velden zijn ingevuld - //voornaam en familienaam,straat en plaats mag alleen uit letters bestaan //en het e-mailadres moet juist zijn...wordt gechecked bij submit if (($_SERVER['REQUEST_METHOD'] == 'POST' && (empty($_POST['naam']) || !empty($familienaam_fout) || empty($_POST['vnaam']) || !empty($voornaam_fout)|| empty($_POST['straat']) || !empty($straat_fout) || empty($_POST['postcode']) || !empty($postcode_fout) || empty($_POST['telnr']) || !empty($telnr_fout) || empty($_POST['plaats']) || !empty($plaats_fout) || empty($_POST['mail']) || !empty($email_fout))) || $_SERVER['REQUEST_METHOD'] == 'GET') { if (!empty($voornaam_fout)) echo '<p>U vulde geen of een foute voornaam in.</p>'; if (!empty($familienaam_fout)) echo '<p>U vulde geen of een foute familienaam in.</p>'; if (!empty($straat_fout)) echo '<p>U vulde geen of een foute straatnaam in.</p>'; if (!empty($huisnr_fout)) echo '<p>U vulde een ongeldig huisnummer in.</p>'; if (!empty($postcode_fout)) echo '<p>Uw postcode mag enkel uit 4 cijfers bestaan.</p>'; if (!empty($plaats_fout)) echo '<p>U vulde geen plaats in.</p>'; if (!empty($email_fout)) echo '<p>U vulde geen e-mail adres in.</p>'; if (!empty($telnr_fout)) echo '<p>U vulde een ongeldig telefoonnummer in (enkel 9 cijfers toegestaan).</p>'; if (!empty($bijzonderh_fout)) echo '<p>U vulde een ongeldig telefoonnummer in (enkel 9 cijfers toegestaan).</p>'; echo' <form method="post" action="' . $_SERVER['REQUEST_URI'] . '"> <p>Vul je voornaam in: <br /> <input type="text" value="' .$voornaam. '" name="vnaam" /> </p> <p>Vul je naam in: <br /> <input type="text" value="' .$familienaam. '" name="naam" /> </p> <p>Straat: <br /> <input type="text" value="' .$straat. '" name="straat" /> </p> <p>Huisnummer: <br /> <input type="text" value="' .$huisnr. '" name="huisnr" /> </p> <p>Postcode: <br /> <input type="text" value="' .$postcode. '" name="postcode" /> </p> <p>Stad: <br /> <input type="text" value="' .$plaats. '" name="plaats" /> </p> <p>E-mail: <br /> <input type="text" value="' .$mail. '" name="mail" /> </p> <p>TELnr(enkel cijfers!): <br /> <input type="text" value="' .$telnr. '" name="telnr" /> </p> <p>*Opmerkingen of bijzonderheden: <br /> <input type="text" value="' .$bijzonderh. '" name="bijzonderh" /> </p> </p> <input type="submit" value="Verzenden" /> <input type="reset" value="Wissen" /> </p> </form>'; } /*Deze else zal worden uitgevoerd bij een correcte input in het basis registratieformulier*/ else{ /*eerste check==> een gezin registreerd==>selecteer aantal kinderen*/ if($_POST['registratiekeuze'] == 'babysit'){ print "U heeft zich geregistreerd als babysit. U registratie wordt afgehandelt."; } else{ echo' <form method="post" action="registreeraantalkids.php"> <p>Ik ben: <br /> <select name="registratiekeuze" id="registratiekeuze"> <option value=1 $een>1 kind</option> <option value=2 $twee>2 kinderen</option> <option value=3 $twee>3 kinderen</option> <option value=4 $twee>4 kinderen</option> <option value=5 $twee>5 kinderen</option> </select> <input type="submit" value="Ga verder..." /> </form> '; } } } The code calling the function: include("functies_voor_registraties.php"); $keuze=globale_keuze(); if($keuze=='gezin'){ algemeen_registratie_formulier(); } elseif($keuze=='babysit') { echo' <p>Registratie voor babysitter:</p>'; algemeen_registratie_formulier(); }
  14. Sorry for the late reply, I wasn't tracking this thread by e-mail (which I thought I did). Thank you for the help, I will try it!
  15. I would like to change my displayname to senca99
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.