Ik heb een sollicitatie script , maar nu wil ik.
Als je niks hebt ingevuld dat er staat:
U heeft niks ingevuld.
Code:
Als je niks hebt ingevuld dat er staat:
U heeft niks ingevuld.
Code:
<div id="center">
<div id="content_top"></div>
<div id="content">
<div class="blue">Solliciteren</div>
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]])) {[/COLOR]
?>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]//Check of hij / zij al een keertje heeft gesoliciteerd![/COLOR]
[COLOR= #0000BB]$s[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM sollicitatie WHERE ip = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$q[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$s[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]POST[/COLOR][COLOR= #007700]){[/COLOR]
[COLOR= #0000BB]$ervaring[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ervaring[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$motivatie[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]motivatie[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$functies[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]functies[/COLOR][COLOR= #007700]]);[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO sollicitatie (id, naam, email, ip, ervaring, motivatie, functies) VALUES (,"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$get_userdata[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$get_userdata[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$ervaring[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$motivatie[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$functies[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]")"[/COLOR][COLOR= #007700])[/COLOR]or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]inloggen[/COLOR][COLOR= #007700]]) &&[/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruikersnaam[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]wachtwoord[/COLOR][COLOR= #007700]])) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je hebt alle velden niet ingevuld. "[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_affected_rows"]mysql_affected_rows[/URL][COLOR= #007700]() >=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Jou sollicitatie is verstuurd[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$form[/COLOR] [COLOR= #007700]=[/COLOR] false[COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<font color="red"><b>Er is iets fout gegaan met je sollicitatie...<br>Probeer het opnieuw!</b></font><br>[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$form[/COLOR] [COLOR= #007700]=[/COLOR] true[COLOR= #007700];
}
}[/COLOR] [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$q[/COLOR][COLOR= #007700]) >=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR]
[COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM sollicitatie "[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$aant[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$nt[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aant[/COLOR][COLOR= #007700])-[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<font color="red"><b>Je hebt al gesoliciteerd samen met [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$nt[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000] andere leden</b></font>[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$form[/COLOR] [COLOR= #007700]=[/COLOR] false[COLOR= #007700];
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$form[/COLOR] [COLOR= #007700]=[/COLOR] true[COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$form[/COLOR][COLOR= #007700]) {[/COLOR]
?>
<font face="Verdana" size="1">Ooit gedroomd dat je op een habbo fansite werkte?
Dan kan het nu uitkomen, wij zoeken namelijk personeel. Je kunt hieronder de
gevraagde gegevens invullen. Wij zullen eventueel contact met je opnemen als we
nog meer informatie nodig hebben.<br>
<b>Veel succes!</b><br><br />
</font>
<font size="1" face="Verdana">
</font>
<form method="POST" action="?p=vacatures" target="_parent">
<tr>
<td><font size="1" face="Verdana">Functie:</font></td>
<td><font size="1" face="Verdana"><select size="1" name="functies">
<option>Nieuwsreporter</option>
<option>Moderator</option>
<option>Organisator</option>
</select></font></td>
</tr><br>
<tr>
<td><font size="1" face="Verdana">Ervaring:</font></td>
<td><font size="1" face="Verdana"><select size="1" name="ervaring">
<option>Ja</option>
<option>Nee</option>
</select></font></td>
</tr>
<tr><br>
<td><font size="1" face="Verdana">Motivatie:</font></td>
<td><font face="Verdana" size="1"><textarea cols="40" rows="5" name="motivatie"></textarea></font></td>
</tr>
<tr>
<td colspan="2"><font face="Verdana" size="1"><input type="submit" name="submit" value="Solliciteer!" class="ContactForm"></font></td>
</tr>
</form>
[COLOR= #0000BB]<?[/COLOR]
[COLOR= #007700]}
}[/COLOR]
?>
</div>
<div id="content_bottom"></div>
</div>