changes for new flexible frame-based layout - not yet complete
[openemr.git] / interface / language / lang_constant.php
blob3f4952bc4378f35af71ef57187767dd029599000
1 <?php
2 require_once("language.inc.php");
5 if ($_POST['Submit']=='Add'){
6 //validate
7 $myconst=$_POST['constant_name'];
8 $sql="SELECT * FROM lang_constants WHERE constant_name='".$_POST['constant_name']."' limit 1" ;
9 $res=SqlQuery($sql);
10 if ( $res ) {
11 echo ("Data Alike is already in database, please change constant name<br>");
12 $err='y';
14 if ($err=='y'){
15 $val_constant=$myconst;
16 } else {
17 $sql="INSERT INTO lang_constants SET constant_name='".$myconst."'";
18 SqlStatement ($sql);
19 echo ("Constant $myconst added<br>");
24 echo "$sql here ";
29 <TABLE>
30 <FORM name="cons_form" METHOD=POST ACTION="?m=constant">
31 <TR>
32 <TD><? xl ('constant name','e'); ?></TD>
33 <TD><INPUT TYPE="text" NAME="constant_name" size="100" value="<? echo $val_constant; ?>"></TD>
34 </TR>
35 <TR>
36 <TD></TD>
37 <TD><INPUT TYPE="submit" name="Submit" value="Add"></TD>
38 </TR>
39 </FORM>
40 </TABLE>
41 Please Note: constants are case sensitive and any string is allowed.