1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
\r
4 <link href="style.css" REL="stylesheet" TYPE="text/css" MEDIA="screen">
\r
5 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
\r
6 <title>Kiriwrite Documentation - Developer Documentation - 1.31: kiriwrite_variablecheck</title>
\r
9 <div class="menubarback">
\r
10 <div class="menubar">
\r
11 <span class="apptitle">Kiriwrite</span>
\r
12 <a href="index.html">Index</a> | <a href="user.html">User
\r
13 Documentation</a> | <a href="tutorial.html">Tutorial Documentation</a> |
\r
14 <a href="developer.html">Developer Documentation</a>
\r
17 <div class="pageinformation">
\r
18 <span class="pagetitle">1.31 kiriwrite_variablecheck</span><br><br>
\r
20 kiriwrite_variablecheck checkes variables that are passed to it to see if the content of that variable is valid and returns an error if it isn't. All the parameters are needed each time the subroutine is called and If the noerror parameter is set to 1 then a value is returned when an error occurs otherwise a standard error message will be given.<br><br>
\r
22 <span class="heading">Parameters:</span><br><br>
\r
25 kiriwrite_variablecheck(variable, type, option, noerror);
\r
30 <span class="heading">Usage:</span><br><br>
\r
33 kiriwrite_variablecheck(“Test 123”, “lettersnumbers”, “”, 0);<br>
\r
34 $letters_letnum_check = kiriwrite_variablecheck(“Test 123”, “lettersnumbers”, “”, 1);
\r
40 Specifies the variable to check.<br><br>
\r
43 Specifies the test to check the variable with.<br><br>
\r
45 <table class="infotable">
\r
47 <td class="tableheading">Value</td>
\r
48 <td class="tableheading">Description</td>
\r
51 <td class="tabledata">numbers</td>
\r
52 <td class="tabledata">Check if the variable given only contains numbers.</td>
\r
55 <td class="tabledata">lettersnumbers</td>
\r
56 <td class="tabledata">Check if the variable given only contains letters and numbers.</td>
\r
59 <td class="tabledata">maxlength</td>
\r
60 <td class="tabledata">Check if the variable given does not exceed the specific length given.</td>
\r
63 <td class="tabledata">blank</td>
\r
64 <td class="tabledata">Check if the variable given is blank.</td>
\r
67 <td class="tabledata">filename</td>
\r
68 <td class="tabledata">Check if the variable given is a valid filename.</td>
\r
71 <td class="tabledata">filenameindir</td>
\r
72 <td class="tabledata">Check if the variable given is a valid filename in a directory.</td>
\r
75 <td class="tabledata">datetime</td>
\r
76 <td class="tabledata">Check if the variable given is a valid date and time format.</td>
\r
79 <td class="tabledata">directory</td>
\r
80 <td class="tabledata">Check if the variable given is a valid directory name.</td>
\r
83 <td class="tabledata">language_filename</td>
\r
84 <td class="tabledata">Check if the variable given is a valid language filename.</td>
\r
87 <td class="tabledata">page_filename</td>
\r
88 <td class="tabledata">Check if the variable given is a valid page filename.</td>
\r
91 <td class="tabledata">module</td>
\r
92 <td class="tabledata">Check if the variable given is a valid module name.</td>
\r
95 <td class="tabledata">utf8</td>
\r
96 <td class="tabledata">Check if the variable given is a correctly formatted UTF-8 string.</td>
\r
99 <td class="tabledata">serverprotocol</td>
\r
100 <td class="tabledata">Check if the variable given is a valid server protocol.</td>
\r
103 <td class="tabledata">port</td>
\r
104 <td class="tabledata">Check if the variable given is a valid server port number.</td>
\r
111 Specifies the setting to be used with the test.<br><br>
\r
114 Specifies if noerror message should be returned but a value should be returned so that a more specific error message can be created.<br><br>
\r
116 For more information on what values are returned, please look at the kiriwrite_error subroutine in the Kiriwrite source code.
\r