Application Form For International Leptospiris Society

%s

\n", $ERRMSG); fatal(""); } if (msqlSelectDB($sock,"ils") < 0) { printf("

%s

\n", $ERRMSG); fatal(""); } $table="tekuci"; if (msqlQuery($sock, "select sledeci from $table") < 0) { printf("

%s

\n", $ERRMSG); fatal(""); } $res=msqlStoreResult(); $row=msqlFetchRow($res); if (#$row > 0) { $no = (int)$row[0]; $last = $no; $rbr = (int)$no + 1; if (msqlQuery($sock, "UPDATE $table SET sledeci=$rbr WHERE sledeci=$last") < 0) { printf("

%s

\n", $ERRMSG); fatal(""); } } else { $rbr = 1; if (msqlQuery($sock, "INSERT INTO $table VALUES ($rbr)") < 0) { printf("

%s

\n", $ERRMSG); fatal(""); } } msqlFreeResult($res); if (#$name>30) { $name = strseg($name, 30); } if (#$surname>30) { $surname = strseg($surname, 30); } if (#$titula>20) { $titula = strseg($titula, 20); } if (#$jobtitle>20) { $jobtitle = strseg($jobtitle, 20); } if (#$company>30) { $company = strseg($company, 30); } if (#$dept>30) { $dept = strseg($dept, 30); } if (#$street>40) { $h_street = strseg($h_street, 40); } if (#$city>20) { $h_city = strseg($h_city, 20); } if (#$zip>10) { $h_zip = strseg($h_zip, 10); } if (#$country>20) { $h_country = strseg($h_country, 20); } if (#$phone>30) { $h_phone = strseg($h_phone, 50); } if (#$pager>30) { $pager = strseg($pager, 30); } if (#$mobil_phone>30) { $mobil_phone = strseg($mobil_phone, 30); } if (#$email>70) { $email = strseg($email, 70); } if (#$home_page>70) { $home_page = strseg($home_page, 70); } if (#$fax>20) { $fax = strseg($fax, 20); } echo("

\n"); printf("
serial No: | %d
\n", $rbr); printf("
Name: | %s, %s
\n", $surname, $name); printf("
Title: | %s
\n", $title); printf("
Job Title: | %s
\n", $jobtitle); printf("
Company: | %s
\n", $company); printf("
Department: | %s
\n", $dept); printf("
Business Address
\n"); printf("
Street: | %s
\n", $street); printf("
Zip, City: | %s %s
\n", $zip, $city); printf("
Country: | %s
\n", $country); printf("
Phone: | %s
\n", $phone); printf("
Fax: | %s
\n", $fax); printf("
Pager: | %s
\n",$pager); printf("
Mobile: | %s
\n",$mobil_phone); printf("
E-mail: | %s
\n",$email); printf("
Home Page: | %s
\n",$home_page); echo("

\n"); if ($name == strseg(" ", 1, #$name)) { $name = "NULL"; } else { $name = "'" + $name + "'"; } if ($surname == strseg(" ", 1, #$surname)) { $surname = "NULL"; } else { $surname = "'" + $surname + "'"; } if ($title == strseg(" ", 1, #$title)) { $title = "NULL"; } else { $title = "'" + $title + "'"; } if ($jobtitle == strseg(" ", 1, #$jobtitle)) { $jobtitle = "NULL"; } else { $jobtitle = "'" + $jobtitle + "'"; } if ($company == strseg(" ", 1, #$company)) { $company = "NULL"; } else { $company = "'" + $company + "'"; } if ($dept == strseg(" ", 1, #$dept)) { $dept = "NULL"; } else { $dept = "'" + $dept + "'"; } if ($street == strseg(" ", 1, #$street)) { $street = "NULL"; } else { $street = "'" + $street + "'"; } if ($zip == strseg(" ", 1, #$zip)) { $zip = "NULL"; } else { $zip = "'" + $zip + "'"; } if ($city == strseg(" ", 1, #$city)) { $city = "NULL"; } else { $city = "'" + $city + "'"; } if ($phone == strseg(" ", 1, #$phone)) { $phone = "NULL"; } else { $phone = "'" + $phone + "'"; } if ($fax == strseg(" ", 1, #$fax)) { $fax = "NULL"; } else { $fax = "'" + $fax + "'"; } if ($pager == strseg(" ", 1, #$pager)) { $pager = "NULL"; } else { $pager = "'" + $pager + "'"; } if ($country == strseg(" ", 1, #$country)) { $country = "NULL"; } else { $country = "'" + $country + "'"; } if ($email == strseg(" ", 1, #$email)) { $email = "NULL"; } else { $email = "'" + $email + "'"; } if ($home_page == strseg(" ", 1, #$home_page)) { $home_page = "NULL"; } else { $home_page = "'" + $home_page + "'"; } if ($mobil_phone == strseg(" ", 1, #$mobil_phone)) { $mobil_phone = "NULL"; } else { $mobil_phone = "'" + $mobil_phone + "'"; } $new = "insert into users values($rbr,$name,$surname,$title,"+ "$jobtitle,$company,$dept,$street,$city,$zip,"+ "$country,$phone,$pager,$mobil_phone,$email,$home_page,$fax,0)"; if (msqlQuery($sock, $new) < 0) { printf("

%s

\n", $ERRMSG); fatal(""); } >
Data added to database