z.Z. ist es so, dass alle Felder ausgefüllt sein müssen, und das zu ändern, musst du in etwa so vorgehen:
Original aus der fightus.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | $far = array (
'clanname',
'clanpage',
'clantag',
'clancountry',
'mailaddy',
'icqnumber',
'squad',
'meetingplace',
'message',
'xonx',
'matchtype',
'game',
'meetingtime',
);
$x = 0;
foreach ($far as $v) {
if (!empty($_POST[$v])) {
$$v = escape($_POST[$v], 'string');
$x++;
} else {
$$v = '';
}
}
|
ungefähr so ? (nicht getestet)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | $far = array (
'clanname',
'clanpage',
'clantag',
'clancountry',
'mailaddy',
'squad',
'meetingplace',
'message',
'xonx',
'matchtype',
'game',
'meetingtime',
);
$x = 0;
foreach ($far as $v) {
if (!empty($_POST[$v])) {
$$v = escape($_POST[$v], 'string');
$x++;
} else {
$$v = '';
}
$far['icqnumber'] = escape($_POST['icqnumber'], 'string'); $x++;
|
Das wäre jetzt mit optionaler ICQNr.