/booka/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/booka/trunk

« back to all changes in this revision

Viewing changes to inc/formif.php

  • Committer: Gustav Hartvigsson
  • Date: 2010-07-18 08:42:56 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20100718084256-yq7xoll9pjgybl19
changed copyright date.
(did not notice that it was old untill i looked true some diffs at LP.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?
 
1
<?php
2
2
/*
3
3
         the ifs and buts for the forms.
4
4
*/
5
5
 
6
6
if($_POST[fromadd]){
7
 
        if($_POST[name]==null){
8
 
                
9
 
                $nameunset = 'style="background-color: red;" ';
10
 
                
 
7
        if($_POST[name] == null){
 
8
                
 
9
                $nameunset = 'class="warning" ';
 
10
                $errorMsg = $errorMsg."you need a name .<br />";
 
11
                $valid = false;
11
12
        }
12
13
        if($_POST[phone] == null){
13
14
                
14
 
                $phoneunset = 'style="background-color: red;" ';
15
 
                
 
15
                $phoneunset = 'class="warning" ';
 
16
                $errorMsg = $errorMsg."you need a phone number .<br />";
 
17
                $valid=false;
16
18
        }
17
19
        if($_POST[email] == null){
18
20
                
19
 
                $emailunset = 'style="background-color: red;" ';
20
 
                
 
21
                $emailunset = 'class="warning" ';
 
22
                $errorMsg = $errorMsg."you need an e-mail adress .<br />";
 
23
                $valid = false;
21
24
        }
22
25
        if($_POST[adress] == null){
23
26
                
24
 
                $adressunset = 'style="background-color: red;" ';
25
 
                
 
27
                $adressunset = 'class="warning" ';
 
28
                $errorMsg = $errorMsg."you need a street adress .<br />";
 
29
                $valid = false;
26
30
        }
27
31
        if($_POST[StartDate] == null){
28
32
                
29
 
                $StartDateunset = 'style="background-color: red;" ';
30
 
                
 
33
                $StartDateunset = 'class="warning" ';
 
34
                $errorMsg = $errorMsg."you need a start date .<br />";
 
35
                $valid = false;
31
36
        }
32
37
        if($_POST[EndDate] == null){
33
38
                
34
 
                $EndDateunset = 'style="background-color: red;" ';
35
 
                
 
39
                $EndDateunset = 'class="warning" ';
 
40
                $errorMsg= $errorMsg."you need a end date .<br />";
 
41
                $valid=false;
36
42
        }
 
43
} else {
 
44
        
 
45
        $valid=false;
37
46
}
38
47
 
39
48
?>