Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Kodi HTML
- -------------
- <form id="FormViewForm" method="post" action="" accept-charset="utf-8">
- <div><input name="data[Form][first_name]" type="text" id="FormFirstName" onclick="this.value='';" onfocus="this.select()" onblur="this.value=!this.value?'Your Name':this.value;" value="Your Name" /></div>
- <div><input name="data[Form][e-mail]" type="text" id="FormE-mail" onclick="this.value='';" onfocus="this.select()" onblur="this.value=!this.value?'Your e-Mail':this.value;" value="Your e-Mail" /></div>
- <div class="submit"><input type="submit" value="Regjistrohu" /></div></form>
- Kodi PHP
- ------------------
- if (!isset($_POST['submit'])) {
- echo "<b style=\"color:red;\">Ky teksti du te hupet kur ta shtajpe butonin submit</b>";
- }
- else {
- echo "Disabled";
- }
- if(isset($_POST["data"]["Form"])){
- require_once 'api/NewsletterMailerAPI.php';
- $nlapi = new NewsletterMailerAPI("www", "dddd");
- $data=$_POST["data"]["Form"];
- //categories ids
- $data["Category"] = array(9);
- if (!$nlapi->checkSubscriber($data["e-mail"])) {
- $return = $nlapi->addSubscriber($data);
- if ($return["status"] == "ok") {
- echo "<b style=\"color:red;\">e-Mail i shtua</b>";
- } else {
- echo "" . $return["msg"];
- }
- }else{
- echo "<b style=\"color:red;\">e-Mail egziston</b>";
- }
- }
Add Comment
Please, Sign In to add comment