Portfolio site, need help with contact form

Hi,
Im a graphic designer turned web designer student. I dont know A LOT of flash, but im learning more as time goes by in and out of school. I currently redid my portfolio website, before it was more of a design taken into dreamweaver and uploaded. Now everything is not completely done, but im doing the site in flash.
www.Nikdesigns.com, if anyones interested...
but im trying to set up a really basic contact page. I have a name/email and message input text boxes and a submit button so far. Is there anyway someone can explain to me exactly what code I need, and what I need to do to be able to set this up correctly? Or link me a good tutorial?
I understand flash needs a php to send the info out and comunicate with, but other then that im lost. What actionscript? and what keyframe?
flash is so frustrating =/ someone please help, lol.

If your contact page is just 1 of the many pages in your site, I'll recommend you write it in HTML/PHP/JSP.
There are many cases when Flash/AS is the efficient tool to get jobs done. But just my humble opinion, I think in this case you'll be more efficient to construct the contacts page with mark-up languages.
Of course, it is possible to do it in Flash/AS and not difficult. I just have 1 question before I go off and try:
When an user submits the form, how do you wish to receive it? As an email in your inbox? Store it in a database? Or elsewhere?
Cheers,

Similar Messages

  • Help with contact form

    Hi,
    there is a contact form on my site and it works to submit a message, but it always has my name as sender in it and my email adress to reply to!
    This is a form where customers are booking appointments, the shop always thinks that the emails are coming from me!
    I checked site manager - system emails - but what am I supposed to put in as from email? It should use the customers email, which will change all the time.
    I need help with that fast!
    Thanks in advance
    cheers
    Cat

    Hello Cat
    The "From" email is the email that will be displayed as the sender of the email (although the email is always sent from our servers), so it is not the customer's email address. You can set it to any email address, that can be your client's email address too, so when a reply is sent, the reply would be sent to the client. This is about the email that is sent to the visitors of the site, also known as the "Autoresponder" email.
    Cheers
    Parikshit

  • I need help with contacts.

    Ok, I just recently got the Iphone 4s.  I need some help with contacts.  I ended up adding my hotmail contacts to my phone and now every time I add a new contact, it adds the person to my hotmail contacts instead of my All On My Iphone contacts.  I don't like it because I am adding phone numbers, not necessarily with email addresses. 
    If you sent me a message right now and I went in and added you as a contact, it adds you to my hotmail contacts instead of my iphone ones for some reason.  How can I fix this?  And if I delete my hotmail account temporarily (and re-add it) will I lose the contacts that my phone put in there mistakenly? 

    Well, I don't care if it makes a back-up of my contacts in my hotmail. But, I would like my contacts to go to my actual phone contacts.  I call and text much more than I email and it would be nice to have to not wade through my email contacts to find someone I am looking to text, etc. 
    I know it's not a huge hassle, but I prefer to keep the people I contact most within my text/phone contacts, rather than email. 
    Also, if I opt to change my email service (hotmail gets a lot of spam), I don't want to lose phone/text contacts because I no longer use that email anymore. 
    I wouldn't even care if they appeared in both, for my most contacted. I just would like to have them in my phone book without having to add them all by hand. 

  • Need Help with Conatct Form

    I created a Contact Form  in DW CS6, and I used the php and html files provided by Nancy O. in her forum dated back to October 2011. Follow the link for details. http://forums.adobe.com/message/3970070#3970070
    I believe I have followed all the required steps, and almost everything seems working properly, except that I am not (Recipient) getting an e-mail. However, the client has received an automated reply from me (Recipient). But no e-mail were sent to me.
    Please refer to below (Part of php code - Between Lines 12 and 35) where I have made the changes:
    I am not sure where I have made an error(s). Could anyone please assist?

    Hi Nancy,
    I created a new Gmail address as you suggested, and then tested the Form with it. I still can't receive an e-mail.
    Also, I have contacted my Web Host, and they confirmed that there are no issues from their end.
    I have attached below both the php and the html files, and I would appreciate if you can take a look at them for correctness:
    PHP File:
    <?php
    // Form Processing Script
    // General Variables
        $check_referrer="no";
        $referring_domains="http://domain.com/,http://www.domain.com/,http://subdomain.domain.com/";
    // options to use if hidden field "config" has a value of 0
    // recipient info
        $charset[0]="iso-8859-1";
        $tomail[0]="[email protected]";
        $cc_tomail[0]=" ";
        $bcc_tomail[0]="";
    // Mail contents config
        $subject[0]="message from EMCG.COM";
        $reply_to_field[0]="email";
        $reply_to_name[0]="email";
        $required_fields[0]="first_name,last_name";
        $required_email_fields[0]="email";
        $attachment_fields[0]="";
        $return_ip[0]="yes";
        $mail_intro[0]="The following message was sent from EMCG.COM:";
        $mail_fields[0]="first_name,last_name,email,phone,subject,message";
        $mail_type[0]="text";
        $mail_priority[0]="1";
        $allow_html[0]="no";
    // Send back to sender config
        $send_copy[0]="yes";
        $copy_format[0]="vert_table";
        $copy_fields[0]="first_name,last_name,subject,message";
        $copy_attachment_fields[0]="";
        $copy_subject[0]="EMCG automated reply";
        $copy_intro[0]="Thanks for taking time to contact EMCG. Someone will be in touch with you soon.";
        $copy_from[0]="[email protected]";
        $copy_tomail_field[0]="email";
    // Result options
        $header[0]="";
        $footer[0]="";
        $error_page[0]="";
        $thanks_page[0]="";
    // Default Error and Success Page Variables
        $error_page_title[0]="Error - Missing Fields";
        $error_page_text[0]="Required information is missing. Please use your browser's back button to return to the form and complete the required fields.";
        $thanks_page_title[0]="Success - Form processing completed";
        $thanks_page_text[0]="Thank you. Please check your e-mail for an automated confirmation. ";
    // Antispam Options
        $empty_field[0]="nospam";
        $character_scan[0]="message";
        $time_delay[0]="";
        $captcha_codes[0]="9C2449,EEADC8,77A585,D72838";
        $max_urls[0]="1";
        $max_url_fields[0]="message";
        $flag_spam[0]="";
    // Don't muck around past this line unless you know what you are doing //
    ob_start();
    $config=$_POST["config"];
    $debug=0;
    $debug_text="";
    // fix for Windows email server security
    ini_set("sendmail_from",$tomail[$config]);
    // email validation regular expression
    $regex = "^[-a-z0-9!#$%&\'*+/=?^_`{|}~]+(\.[-a-z0-9!#$%&\'*+/=?^_`{|}~]+)*@(([a-z0-9]([-a-z0-9]*[a -z0-9]+)?){1,63}\.)+([a-z]([-a-z0-9]*[a-z0-9]+)?){2,63}$";
    $header_injection_regex = "(\r|\n)";
    if($header[$config]!="")
        include($header[$config]);
    if($_POST["submit"] || $_POST["Submit"] || $_POST["submit_x"] || $_POST["Submit_x"])
    // begin global functions //
    // get visitor IP
        function getIP()
            if(getenv(HTTP_X_FORWARDED_FOR))
                $user_ip=getenv("HTTP_X_FORWARDED_FOR");
            else
                $user_ip=getenv("REMOTE_ADDR");
            return $user_ip;
    // get value of given key
        function parseArray($key)
            $array_value=$_POST[$key];
            $count=1;
            extract($array_value);
            foreach($array_value as $part_value)
                if($count > 1){$value.=", ";}
                $value.=$part_value;
                $count=$count+1;
            return $value;
    // stripslashes and autolink url's
        function parseValue($value)
            $value=preg_replace("/(http:\/\/+.[^\s]+)/i",'<a href="\\1">\\1</a>', $value);
            return $value;
    // html header if used
        function htmlHeader()
            $htmlHeader="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\">\n<html>\n<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=".$charset[$config]."\"></head>\n<body>\n<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"600\">\n";
            return $htmlHeader;
    // html footer if used
        function htmlFooter()
            $htmlFooter="</table>\n</body>\n</html>\n";
            return $htmlFooter;
    // build verticle table format
        function buildVertTable($fields, $intro, $to, $send_ip)
            $message=htmlHeader();
            if($intro != "")
                $message.="<tr>\n<td align=\"left\" valign=\"top\" colspan=\"2\">".$intro."</td>\n</tr>\n";
            $fields_check=preg_split('/,/',$fields);
            $run=sizeof($fields_check);
            for($i=0;$i<$run;$i++)
                $cur_key=$fields_check[$i];
                $cur_value=$_POST[$cur_key];
                if(is_array($cur_value))
                    $cur_value=parseArray($cur_key);
                $cur_value=parseValue($cur_value);
                if($allow_html[$config]=="no")
                    $cur_value=htmlspecialchars(nl2br($cur_value));
                else
                    $cur_value=nl2br($cur_value);
                $message.="<tr>\n<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>".$cur_key."</b></td>\n<td align=\"left\" valign=\"top\" width=\"100%\">".$cur_value."</td>\n</tr>\n";
            if($send_ip=="yes" && $to=="recipient")
                $user_ip=getIP();
                $message.="<tr>\n<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>Sender IP</b></td>\n<td align=\"left\" valign=\"top\" width=\"100%\">".$user_ip."</td>\n</tr>\n";
            $message.=htmlFooter();
            return $message;
    // build horizontal table format
        function buildHorzTable($fields, $intro, $to, $send_ip)
            $message=htmlHeader();
            $fields_check=preg_split('/,/',$fields);
            $run=sizeof($fields_check);
            if($intro != "")
                $message.="<tr>\n<td align=\"left\" valign=\"top\" colspan=\"".$run."\">".$intro."</td>\n</tr>\n";
            $message.="<tr>\n";
            for($i=0;$i<$run;$i++)
                $cur_key=$fields_check[$i];
                $message.="<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>".$cur_key."</b></td>\n";
            if($send_ip=="yes" && $to=="recipient")
                $message.="<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>Sender IP</b></td>\n";
            $message.="</tr>\n";
            $message.="<tr>\n";
            for($i=0;$i<$run;$i++)
                $cur_key=$fields_check[$i];
                $cur_value=$_POST[$cur_key];
                if(is_array($cur_value))
                    $cur_value=parseArray($cur_key);
                $cur_value=parseValue($cur_value);
                if($allow_html[$config]=="no")
                    $cur_value=htmlspecialchars(nl2br($cur_value));
                else
                    $cur_value=nl2br($cur_value);
                $message.="<td align=\"left\" valign=\"top\">".$cur_value."</td>\n";
            $message.="</tr>\n";
            $message.="<tr>\n";
            if($send_ip=="yes" && $to=="recipient")
                $user_ip=getIP();
                $message.="<td align=\"left\" valign=\"top\">".$user_ip."</td>\n";
            $message.="</tr>\n";
            $message.=htmlFooter();
            return $message;
    // build plain text format
        function buildTextTable($fields, $intro, $to, $send_ip)
            $message="";
            if($intro != "")
                $message.=$intro."\n\n";
            $fields_check=preg_split('/,/',$fields);
            $run=sizeof($fields_check);
            for($i=0;$i<$run;$i++)
                $cur_key=$fields_check[$i];
                $cur_value=$_POST[$cur_key];
                if(is_array($cur_value))
                    $cur_value=parseArray($cur_key);
                $cur_value=parseValue($cur_value);
                if($allow_html[$config]=="no")
                    $cur_value=htmlspecialchars($cur_value);
                else
                    $cur_value=$cur_value;
                $message.="".$cur_key.": ".$cur_value."\n";
            if($send_ip=="yes" && $to=="recipient")
                $user_ip=getIP();
                $message.="Sender IP: ".$user_ip."\n";
            return $message;
    // get the proper build fonction
        function buildTable($format, $fields, $intro, $to, $send_ip)
            if($format=="vert_table")
                $message=buildVertTable($fields, $intro, $to, $send_ip);
            else if($format=="horz_table")
                $message=buildHorzTable($fields, $intro, $to, $send_ip);
            else
                $message=buildTextTable($fields, $intro, $to, $send_ip);
            return $message;
    // referrer checking security option
        function checkReferer()
            if($check_referrer=="yes")
                $ref_check=preg_split('/,/',$referring_domains);
                $ref_run=sizeof($ref_check);
                $referer=$_SERVER['HTTP_REFERER'];
                $domain_chk="no";
                for($i=0;$i<$ref_run;$i++)
                    $cur_domain=$ref_check[$i];
                    if(stristr($referer,$cur_domain)){$domain_chk="yes";}
            else
                $domain_chk="yes";
            return $domain_chk;
    // checking required fields and email fields
        function checkFields($text_fields, $email_fields, $regex)
              $error_message="";
            if($debug==1)
                $error_message.="<li>text_fields: ".$text_fields."<br />email_fields: ".$email_fields."<br />reply_to_field: ".$reply_to_field."<br />reply_to_name: ".reply_to_name."</li>";
            if($text_fields != "")
                $req_check=preg_split('/,/',$text_fields);
                $req_run=sizeof($req_check);
                for($i=0;$i<$req_run;$i++)
                    $cur_field_name=$req_check[$i];
                    $cur_field=$_POST[$cur_field_name];
                    if($cur_field=="")
                        $error_message.="<li>You are missing the <b>".$req_check[$i]."</b> field</li>\n";
            if($email_fields != "")
                $email_check=preg_split('/,/',$email_fields);
                $email_run=sizeof($email_check);
                for($i=0;$i<$email_run;$i++)
                    $cur_email_name=$email_check[$i];
                    $cur_email=$_POST[$cur_email_name];
                    if($cur_email=="" || !eregi($regex, $cur_email))
                        $error_message.="<li>You are missing the <b>".$email_check[$i]."</b> field or it is not a valid email address.</li>\n";
            return $error_message;
    // attachment function
        function getAttachments($attachment_fields, $message, $content_type, $border)
            $att_message="This is a multi-part message in MIME format.\r\n";
            $att_message.="--{$border}\r\n";
            $att_message.=$content_type."\r\n";
            $att_message.="Content-Transfer-Encoding: 7bit\r\n\r\n";
            $att_message.=$message."\r\n\r\n";
            $att_check=preg_split('/,/',$attachment_fields);
            $att_run=sizeof($att_check);
            for($i=0;$i<$att_run;$i++)
                $fileatt=$_FILES[$att_check[$i]]['tmp_name'];
                $fileatt_name=$_FILES[$att_check[$i]]['name'];
                $fileatt_type=$_FILES[$att_check[$i]]['type'];
                if (is_uploaded_file($fileatt))
                    $file=fopen($fileatt,'rb');
                    $data=fread($file,filesize($fileatt));
                    fclose($file);
                    $data=chunk_split(base64_encode($data));
                    $att_message.="--{$border}\n";
                    $att_message.="Content-Type: {$fileatt_type}; name=\"{$fileatt_name}\"\r\n";
                    $att_message.="Content-Disposition: attachment; filename=\"{$fileatt_name}\"\r\n";
                    $att_message.="Content-Transfer-Encoding: base64\r\n\r\n".$data."\r\n\r\n";
            $att_message.="--{$border}--\n";
            return $att_message;
    // function to set content type
        function contentType($charset, $format)
            if($format=="vert_table")
                $content_type="Content-type: text/html; charset=".$charset."\r\n";
            else if($format=="horz_table")
                $content_type="Content-type: text/html; charset=".$charset."\r\n";
            else
                $content_type="Content-type: text/plain; charset=".$charset."\r\n";
            return $content_type;
    // end global functions //
    // begin procedural scripting //
        // anti-spam empty field check
        if($_POST[$empty_field[$config]] != "")
            $empty_message = "<li>This submission failed and was flagged as spam.</li>\n";
        // anti-spam character scan check
        if(strlen($character_scan[$config]) > 0)
            $spam_message="";
            $field_check=preg_split('/,/',$character_scan[$config]);
            $field_run=sizeof($field_check);
            for($i=0;$i<$field_run;$i++)
                $cur_field_name=$field_check[$i];
                $cur_field=$_POST[$cur_field_name];
                if(preg_match("/<(.|\n)+?>/", $cur_field) || preg_match("/\[(.|\n)+?\]/", $cur_field))
                    $spam_message.="<li>This message contains disallowed characters.</li>\n";
        // anti-spam time delay check
        if((strlen($time_delay[$config]) > 0 && strlen($_POST["time"]) > 0) || (strlen($time_delay[$config]) > 0 && (strlen($_POST["time"]) == 0 || !$_POST["time"])))
            if((time() - $_POST["time"]) < $time_delay[$config])
                $time_message = "<li>This has been stopped by the timer, and is likely spam.</li>\n";
        // anti-spam CAPTCHA check
        if(strlen($captcha_codes[$config]) > 0)
            $captcha_check=preg_split('/,/',$captcha_codes[$config]);
            if(strtolower($_POST["captcha_entry"]) != strtolower($captcha_check[$_POST["captcha_code"]]))
                $captcha_message = "<li>CAPTCHA test did not match.</li>\n";
        // anti-spam max URL check
        if(strlen($max_url_fields[$config]) > 0)
            $max_url_message="";
            $field_check=preg_split('/,/',$max_url_fields[$config]);
            $field_run=sizeof($field_check);
            for($i=0;$i<$field_run;$i++)
                $cur_field_name=$field_check[$i];
                $cur_field=$_POST[$cur_field_name];
                preg_match_all("/http:/", $cur_field, $matches);
                if(count($matches[0]) > $max_urls[$config])
                    $max_url_message.="<li>This message contains too many URL's.</li>\n";
        // set anti-spam flagging option
        if(strlen($empty_message.$spam_message.$time_message.$captcha_message.$max_url_message) > 0 && strlen($flag_spam[$config]) == 0)
            $set_flag = 2;
        else if(strlen($empty_message.$spam_message.$time_message.$captcha_message.$max_url_message) > 0 && strlen($flag_spam[$config]) > 0)
            $set_flag = 1;
        else
            $set_flag = 0;
        // header injection check
           $security_filter="";
        if(strlen($_POST[$reply_to_field[$config]]) > 0)
            if(eregi($header_injection_regex,$_POST[$reply_to_field[$config]]))
                $security_filter.="<li>Header injection attempt detected, mail aborted.</li>\n";
            else
                $reply_to_field_checked=$_POST[$reply_to_field[$config]];
        if(strlen($_POST[$reply_to_name[$config]]) > 0)
            if(eregi($header_injection_regex,$_POST[$reply_to_name[$config]]))
                $security_filter.="<li>Header injection attempt detected, mail aborted.</li>\n";
            else
                $reply_to_name_checked=$_POST[$reply_to_name[$config]];
        // check domain referrer and continue
        $domain_chk=checkReferer();
        if($domain_chk=="yes")
            $error_message=checkFields($required_fields[$config], $required_email_fields[$config], $regex);
            if(strlen($error_message) < 1 && strlen($security_filter) < 1 && $set_flag < 2)
                // build appropriate message format for recipient
                $content_type=contentType($charset[$config], $mail_type[$config]);
                $message=buildTable($mail_type[$config], $mail_fields[$config], $mail_intro[$config], "recipient", $return_ip[$config]);
                // build header data for recipient message
                //$extra="From: ".$_POST[$reply_to_field[$config]]."\r\n";
                $extra="From: ".$reply_to_name_checked." <".$reply_to_field_checked.">\r\n";
                if($cc_tomail[$config]!="")
                    $extra.="Cc: ".$cc_tomail[$config]."\r\n";
                if($bcc_tomail[$config]!="")
                    $extra.="Bcc: ".$bcc_tomail[$config]."\r\n";
                if($mail_priority[$config]!="")
                    $extra.="X-Priority: ".$mail_priority[$config]."\r\n";
                // get attachments if necessary
                if($attachment_fields[$config]!="")
                    $semi_rand=md5(time());
                    $border="==Multipart_Boundary_x{$semi_rand}x";
                    $extra.="MIME-Version: 1.0\r\n";
                    $extra.="Content-Type: multipart/mixed; boundary=\"{$border}\"";
                    $message=getAttachments($attachment_fields[$config], $message, $content_type, $border);
                else
                    $extra.="MIME-Version: 1.0\r\n".$content_type;
                // send recipient email
                if($debug==1)
                    if($set_flag == 1)
                        $debug_text.="<p><b>Mail would have sent flagged for spam if not in debug mode.</b></p>";
                    else
                        $debug_text.="<p><b>Mail would have sent if not in debug mode.</b></p>";
                else if($debug==0)
                    if($set_flag == 1)
                        $subject = $flag_spam[$config]." ".$subject[$config];
                    else
                        $subject = $subject[$config];
                    mail("".$tomail[$config]."", "".stripslashes($subject)."", "".stripslashes($message)."", "".$extra."");
                // autoresponse email if necessary
                if($send_copy[$config]=="yes")
                    // build appropriate message format for autoresponse
                    $content_type=contentType($charset[$config], $copy_format[$config]);
                    $message=buildTable($copy_format[$config], $copy_fields[$config], $copy_intro[$config], "autoresponder", $return_ip[$config]);
                    // build header data for autoresponse
                    $copy_tomail=$_POST[$copy_tomail_field[$config]];
                    $copy_extra="From: ".$copy_from[$config]."\r\n";
                    // get autoresponse  attachments if necessary
                    if($copy_attachment_fields[$config]!="")
                        $semi_rand=md5(time());
                        $border="==Multipart_Boundary_x{$semi_rand}x";
                        $copy_extra.="MIME-Version: 1.0\r\n";
                        $copy_extra.="Content-Type: multipart/mixed; boundary=\"{$border}\"";
                        $message=getAttachments($copy_attachment_fields[$config], $message, $content_type, $border);
                    else
                        $copy_extra.="MIME-Version: 1.0\r\n".$content_type;
                    // send autoresponse email
                    if($debug==1)
                        if($set_flag == 1)
                            $debug_text.="<p><b>Autoresponder would have sent flagged for spam if not in debug mode.</b></p>";
                        else
                            $debug_text.="<p><b>Autoresponder would have sent if not in debug mode.</b></p>";
                    else if($debug==0)
                        $send_copy = 1;
                        if($copy_tomail=="" || !eregi($regex,$copy_tomail))
                            $send_copy = 0;
                        if($send_copy == 1)
                            if($set_flag == 1)
                                $copy_subject = $flag_spam[$config]." ".$copy_subject[$config];
                            else
                                $copy_subject = $copy_subject[$config];
                            mail("$copy_tomail", "".$copy_subject."", "$message", "$copy_extra");
                // showing thanks pages from a successful submission
                if($thanks_page[$config]=="")
                    echo "<h3>".$thanks_page_title[$config]."</h3>\n";
                    echo "<p>".$thanks_page_text[$config]."</p>\n";
                    if(strlen($debug_text) > 0)
                        echo "<p><b><i>".$debug_text."</i></b></p>\n";
                else
                    header("Location: ".$thanks_page[$config]);
            else
                // entering error page options from missing required fields
                if($error_page[$config]=="")
                    echo "<h3>".$error_page_title[$config]."</h3>\n";
                    echo "<ul>\n";
                    echo $security_filter.$empty_message.$error_message.$spam_message.$time_message.$captcha_messa ge.$max_url_message;
                    echo "</ul>\n";
                    echo "<p>".$error_page_text[$config]."</p>\n";
                else
                    header("Location: ".$error_page[$config]);
        else
            echo "<h3>".$error_page_title[$config]."</h3>\n";
            // message if unauthorized domain trigger from referer checking option
            echo "<p>Sorry, mailing request came from an unauthorized domain.</p>\n";
    // end procedural scripting //
    else
        echo "<h3>Error</h3>";
        echo "<p>No form data has been sent to the script</p>\n";
    if($footer[$config]!="")
        include($footer[$config]);
    ob_end_flush();
    ?>
    <input type="button" value="Return to Form" onClick="javascript: history.go(-1);" />
    HTML File:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Sample Form</title>
    <style type="text/css">
    /**BEGIN FORM STYLES**/
    #form1 {
    font-size: 14px;
    width: 500px;
    margin: 0 auto; /**centered**/
    background: #FFF;
    border: 2px groove green;
    padding: 7px 14px 7px 14px;
    fieldset {
    margin-bottom: 5px;
    border-right: none;
    border-bottom: none;
    border-left: none;
    legend {
    padding: 8px;
    border: 1px solid silver;
    background: #009900;
    font-weight: bold;
    color: #FFFFFF;
    margin-left: -75px;
    *margin-left:0;
    line-height: 1.5
    /**wrap form lables and fields inside ordered lists for better web accessibility**/
    #form1 ol {
    list-style: none;
    margin: 0;
    padding: 0
    #form1 li {
    padding: 5px;
    margin: 0;
    clear: left;
    label {
    display: inline-block;
    float: left;
    line-height: 23px; /**lines up labels with fields**/
    width: 167px;
    font-size: 12px;
    color: #666;
    text-align: right;
    margin-right: 10px; /*space between labels, fields*/
    input[type=text], textarea {
    width: 190px; /**same width on text fields**/
    padding: 5px;
    color: #666;
    border: 1px dotted #009900;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    /**field background on focus**/
    input:focus, input:active, textarea:focus, textarea:active {
    background-color: #EBECDE;
    border: 1px solid;
    #submit {
    margin-left: 45px;
    background: #009900;
    font-size: 18px;
    color: #FFF;
    font-weight: bold;
    border: 2px outset #FFF
    #submit:hover, #submit:focus, #submit:active {
    background: #006600;
    color: yellow;
    border: 2px inset #FFF
    /**END FORM STYLES**/
    </style>
    </head>
    <body>
    <!--BEGIN HTML FORM, action="path to form-processing script on your server" -->
    <form id="form1" action="vsi2.php" method="post" enctype="multipart/form-data" name="form1">
      <h3>HTML Contact Form</h3>
      <fieldset>
        <legend>Required Fields:</legend>
        <!--spam prevention-->
        <input name="config" type="hidden" value="0" />
        <input type="text" name="nospam" style="display:none" />
        <ol>
          <li>
            <label for="first_name">First Name:</label>
            <input name="first_name" id="first_name" type="text" />
          </li>
          <li>
            <label for="last_name">Last Name:</label>
            <input name="last_name" id="last_name" type="text" />
          </li>
          <li>
            <label for="email">E-mail:</label>
            <input name="email" id="email" type="text" />
          </li>
        </ol>
      </fieldset>
      <fieldset>
        <legend>Optional Fields:</legend>
        <ol>
          <li>
            <label for="phone">Phone number:</label>
            <input name="phone" id="phone" type="text" />
          </li>
          <li>
            <label for="subject">Subject:</label>
            <input name="subject" id="subject" type="text" />
          </li>
          <li>
            <label for="message">Message:</label>
            <textarea id="message" name="message"></textarea>
          </li>
          <li>
            <label for="submit"> </label>
            <input type="submit" name="submit" id="submit" value="Submit" />
          </li>
        </ol>
      </fieldset>
    </form>
    <!--END OF FORM -->
    </body>
    </html>
    Test File:
    http://www.energymcg.com/Original/contactus.html
    Thank you for your patience and for sticking with me. I really appreciate it.
    Khalid

  • Need help with PHP form with checkboxes, radio buttons and file attachment

    Hi guys,
    I'm having a nightmare with this PHP form where a user can fill it in, attach a doc/pdf and submit. After trying to sort it out with previous code I've used, I've stripped it out and think I should just start again in the hope you geniuses can help!
    Here is the HTML of contact.php:
    <form action="" method="post" name="contact" id="contact">
        <p>Job Title:*<br />
        <input name="position" type="text" /></p>
        <p>Nationality:*<br />
        <select name="nationality">
          <option value="">-- select one --</option>
          <option value="Afghan">Afghan</option>
          <option value="Albanian">Albanian</option>
          <option value="Algerian">Algerian</option>
          <option value="Zambian">Zambian</option>
          <option value="Zimbabwean">Zimbabwean</option>
        </select>
        </p>
        <p>Which country are you currently living in?*<br />
        <select name="country">
        <option value="">-- select one --</option>
        <option value="United Kingdom">United Kingdom</option>
        <option value="Afghanistan">Afghanistan</option>
        <option value="Africa">Africa</option>
        <option value="Zambia">Zambia</option>
        <option value="Zimbabwe">Zimbabwe</option>
        </select>
        </p>
        <label class="radio" for="checkRight">Yes/No question?</label><br />
        <input class="radio" type="radio" name="right" value="Yes" /> Yes
        <input class="radio" type="radio" name="right" value="No" /> No
        <input class="radio" type="radio" name="right" value="N/A" /> Not applicable
        <p>Yes/No question?<br />
        <select name="continue">
        <option value="">-- select one --</option>
        <option value="Yes">Yes</option>
        <option value="No">No</option>
        </select>
        </p>
        <p>Select your resorts:<br />
        Resort 1<input name="res1" type="checkbox" value="Resort 1" />
        Resort 2<input name="res2" type="checkbox" value="Resort 2" />
        Resort 3<input name="res3" type="checkbox" value="Resort 3" />
        Resort 4<input name="res4" type="checkbox" value="Resort 4" />
        Resort 5<input name="res5" type="checkbox" value="Resort 5" />
        Resort 6<input name="res6" type="checkbox" value="Resort 6" />   
        </p>
        <p>Don't send form unless this is checked:* <input type="checkbox" name="parttime" value="Yes" /></p>
        <p>Date of arrival: <input name="arrive" id="datepick" /><br />
        Date of departure: <input name="depart" id="datepick2" /></p>
        <script type="text/javascript" src="assets/scripts/datepickr/datepickr.js"></script>
        <link href="assets/scripts/datepickr/datepickr.css" rel="stylesheet">
        <script type="text/javascript">
        new datepickr('datepick');
        new datepickr('datepick2', {
        </script>
        <p>Name:*<br />
        <input name="name" type="text" /></p>
        <p>E-mail:*<br />
        <input name="email" type="text" /></p>
        <p>Telephone:*<br />
        <input name="telephone" type="text" class="ctextField" /></p>
        <p>Upload CV (Word of PDF formats only):<br />
        <input type="file" name="cv" class="textfield"></p>
        <p><input name="submit" value="Submit Enquiry" class="submitButton" type="submit" /><div style="visibility:hidden; width:1px; height:1px"><input name="url" type="text" size="45" id="url" /></div></p>
    </form>
    By the way, the date boxes work so excuse the Javascript in there!
    To prevent SPAM I've used a trick where there's a hidden URL field which must be left blank for the form to submit which you can see in the PHP.
    Below is where I'm at with the PHP which is placed above the header of contact.php...
    <?php
    if (array_key_exists('submit', $_POST)) {
        $position = $_POST['position'];
        $arrive = $_POST['arrive'];
        $nationality = $_POST['nationality'];
        $parttime = $_POST['parttime'];
        $depart = $_POST['depart'];
        $name = $_POST['name'];
        $email = $_POST['email'];
        $telephone = $_POST['telephone'];
    $to = "[email protected]";
    $subject = "Recruitment Application";
    $message = $headers;
    $message .= "Name: " . $_POST["name"] . "\r\n";
    $message .= "E-mail: " . $_POST["email"] . "\r\n";
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
    $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
    $headers .= 'From: My Website <[email protected]>' . "\r\n";
    $message= "
    $url = stripslashes($_POST["url"]);
    if (!empty($url)) {
    header( 'Location: http://www.go-away-spam-robots.com' );
    exit();
    if (!isset($warning)) {
    mail($to, $subject, $message, $headers);
    header( 'Location: http://www.mywebsite.co.uk/sent.php' );
    ?>
    I would like to make pretty much all the field compulsory so if a field is left empty (other than the hidden URL field), a warning message is displayed next to that field.
    Also I would like the file upload field to attach to the email that is sent to me and have the results come through to me in a table format.
    Can anyone help me get my form working?
    Thank you and I hope to hear from you!
    SM

    Hi Nancy,
    Great stuff, thank you for the reply.
    I've managed to get the Formm@iler working and running as I need it to.
    The only thing I'm struggling with is when the user clicks submit, they are taken to a page of whatever results the form returned but it is just a white background with Times New Roman text.
    How can I have it so the user is taken to the form results in the websites' page layout?
    I tried sending them to a generic 'thank you' page by adding the following code but it just took them there whatever the results of the form so that's no good...! I have a feeling it's a bit more complicated than that...
    header( 'Location: http://www.nofussbus.co.uk/test/sent.php' );
    Thank you for your help!

  • Need help with designing form for exports

    Hi
    I am pretty new to designing form in adobe acrobat.
    I have adobe acrobat 9 standard with Adobe liveCycle Designer installed.
    There are couple of things I want to do.
    1.
    I would like to add a box where I can change the number (default is 1), and when I increase it, (for instance to two)
    then
    it will postulate the particular sections twice.
    For instance, I am taking two drugs right now, then I would like to increase the number of drugs to 2, so then for each drug
    I would enter appropriate information such as drug name, drug form, route of drug administration etcs
    I hope this is clear
    2.
    I am trying to export this in xml format so that only the ones where the user fills in in pdf form gets exported to xml format.
    I would like the boxes to have its own tag, for instance the drug name mentioned above can have a tag of <drugname></drugname>
    I know this is possible through changing the box's name in binding tab.
    What I am interested in is to add a tag for the section, like a header.
    For example, if I were to enter two drug information I want the first drug information to be exported to be
    <drug>
    <drugname>blah</drugname><drugform>1</drugform><drugroute>oral</drugroute>
    </drug>
    <drug>
    <drugname>drug2</drugname><drugform>1</drugform>
    <drugroute>ophthalmic</drugroute>
    </drug>
    how would I add <drug> </drug> for each drug?
    also, can I change the order of the tags??
    in the pdf form, if the drugname box is displayed later than drugroute box, then when I export it, it will display as
    <drugroute>oral</drugroute><drugname>blah</drugname>
    but I want to manually set the order of tags when exported.
    Sorry I asked so many questions
    I hope it is clear enough for you to visualize what I am trying to do
    Thank you so much

    1. You can certainly add sections for the number of drugs that the user specifies pr
    ovided that the form is set up the correct way to begin with. The drug information section must be wrapped in a subform (usually Poistioned) and that in turn must be wrapped in a flowed subform. Then the form must be saved as dynamic. If this information is all that is on the form then that shoudl be all you need to do. If th edrug section is in the middle of the form then you need to wrap the other parts of the form in a subform so they can be pushed down when we add the drug subforms. It can get confusing ...seeing the form amnd its structure would help to clarify.
    2. You canbnot change the names of tags on the fly but you can change their values. AS mentioned above, when you wrap the Drug information in a subform that subform name can be used as a tag in the XML. Then you could have a node with the tag (or an attribute) that names the drug in question. Something like this:
    <Drug Section>
         <Drug>
              <DrugName></DrugName>
              <Dossage></Dossage>
              <Supplier></Supplier>
         </Drug Subform>
         <Drug>
              <DrugName></DrugName>
              <Dossage></Dossage>
              <Supplier></Supplier>
         </Drug>
    </Drug Section>
    As mentioned earlier this is always easier to explain when you see it in context of your form.....if you want to send it to me at [email protected] I can get you started at least. Please include a description of your issue in the email
    Paul

  • Need help with contact recovery

    i need some help please
    i lost my bb 9900 last week and now am using a bb 8520 that has os 5.0 i believe
    supposedly bb protect will not work with this phone so I cannot access my weekly backups from protect website
    is there anyway i can transfer those online backups to my home mac computer so i can load to this phone without installing protect app? (it wont let me install on this phone)
    if not - can someone from RIM send to me? i can see the backup files on protect website - latest from around when i lost my phone.
    the reason for all this is i have many BBM contacts - and previously, i was able to restore using email when i got my 9900 and it loaded successfully - now, when i try retore by email - it states no contacts linked to my email address!
    i dont have these bbm contacts on my mac since the last backup on the computer was last year - since then, i have only backed up using protect
    i am having no luck at all!!!!

    sunnyb82 wrote:
    but i dont understand your last part:
    (this doesnt show up in my options tab for contacts)
    As for the continued inability to restore your contacts from BB Protect, also check this:
    On the BlackBerry smartphone, navigate to Contacts > Options > Desktop Contact List. Set Wireless Synchronization to No.
    Check that same setting for any Contact Lists you have displayed in the Contacts Options area.
    not sure what this all means > Further, if you are going to use Google as your Contact list source, then restoring from any source is moot...if Google has the correct data, then allowing it to continue OTA synchronization would be your best approach.
    My point was that the Option setting indicated may or may not exist...if it exists, then it needs to be set to NO. If it does not exist, then it is not relevant (which I think is what applies in your case). In any event, since you were able to restore, all is well as far as contacts are concerned.
    sunnyb82 wrote:
    so i have my old BBM pin - how can i retrieve the BBM contacts from there? its linked to my gmail address because i restored by email to my 9900 last time
    You have your old BBM PIN? Hmmm...I'm not quite sure what you mean by that. Knowing the PIN is just that...knowing the unique PIN that was assigned to your old BB at time of manufacture. But, for obtaining your old BBM contacts, you'd need the actual device or a successful backup that was previously created (either the Desktop Software or via the in-BBM backup method). Knowing only the PIN itself now, I don't see how that applies. Perhaps I do not understand?
    Now, if what you did was do the remote in-BBM backup using an email address, then that's a different thing indeed. But I don't exactly know how that works...it may well be that it only works for the exact same BB and not to another BB. I've always used the local file BBM contact backup as I then know for certain that I have control over the backup file.
    sunnyb82 wrote:
    can someone from rim help me retrieve this data since its all stored on the servers...
    For free, only if you can convince your mobile service provider to escalate your case into RIM.
    For a fee, you can ask via Incident Support, but it does cost to just ask the initial question, and I've no idea if there even is a way to accomplish what you are wanting to have them do (I rather doubt it, but I still do not quite understand what your request is):
    http://us.blackberry.com/support/programs/technical/incident.html
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Need Help With Contact Info Before Sync

    I just got my first iPhone, I had a treo 700wx before this, and use Outlook 2003 for my contacts. I want to download them to my iPhone but would like to know if I need to make changes to my contact names before I do.
    In Outlook and my 700wx the names are list last name first with a comma in between i.e., Doe, John.
    When I sync my contacts will the first name end up where it should and the last name where it should, or do I need to change them in Outlook before syncing.
    Thanks for any help,

    You can set Contacts to display and sort them as you prefer:
    Settings > Mail, Contacts, Calendars > (scroll down to Contacts) Sort Order > Last, First or First, Last and Display Order > Last, First or First, Last

  • Need help with contacts

    Hi,  I've had contacts on my imac for years.  then, about 4 years ago, I got an iphone... I help out for a while ;-) 
    I back my iphone and ipad up to my imac at home.  So once I got my iphone, I created a group called iphone contacts as, at the time, I did not want to have EVERY contact I have on my phone.  At the time, I felt like there were ones I'd want to keep at home, wanting to just have my family and friends on my phone. So when I backed up, I had a folder I called iphone contacts and that is what backed up to my phone.
    Zip forward what feels like a technological millenium, iCloud is working and I'm using my phone much more than I did in the beginning and for more things. 
    Now I have much of my data backed up to iCloud, such as contacts, calenders, reminders, safari and notes.  I don't have mail via iCloud as I use gmail and it does it for me basically.
    So today, I got an address update for one of my contacts.  I went into contacts on my iphone and edited it with the new snail mail address.  Upon arriving home tonight, I decided to back up my iphone and looked at my contacts first, wanting to make sure the new change was there.  It is not.  I'm not sure why but in looking at my iphone's contacts, I find I have groups that were created due to previous ways of sorting and tracking data and now, with the cloud, it is just a bit confusing.  in my contacts on my imac, I see the following categories and groups
    at the very top
    ALL Contacts (in blue)
    On my Mac (in gray)
         All on my mac
    iCloud (in gray)
         All iCloud
         Family
         iPhone Contacts
    Smart Groups (in gray(
         Last Import
    And on my iphone I see three groups
    All Contacts
    Family
    iPhone Contacts
    It seems that now that I am using iCloud to hold and sync my contacts, the use of groups is truly more about a mail list.. such as family, so if I want to email all my sibs, etc.  So can I just delete all the groups and just have one pool of contacts, which I assume would be ALL CONTACTS, correct?  
    And then, as I see the need, I can create a group and drag the various contacts to that group? 
    And if I change info in a contact, will it show up in any group in which that contact is a member?
    thanks for any help.
    M

    From Contacts Help. Type in smart groups:
    Use Smart Groups
    A Smart Group groups contacts automatically based on criteria you specify. For example, group all the members of your swim club by creating a Smart Group for contacts that have “swim” in the notes field. Then every time you enter “swim” in a contact’s notes field, the contact is added automatically to your swim club Smart Group. Smart Groups can include contacts from any account.
    Open Contacts
    HideCreate a Smart Group
    Choose File > New Smart Group.
    Enter a name for the Smart Group.
    Specify the conditions.
    Use the pop-up menus and entry field to set the conditions. Click Add to specify additional conditions.
    If you include a group in a condition (by choosing “Card is member of” or “Card is not member of”), you can’t delete that group until you either change the condition or delete the Smart Group that uses the condition.
    Click OK.
    HideEdit a Smart Group
    Select the group, and then choose Edit > Edit Smart Group.
    HideRename a Smart Group
    Select the group, and then click the group’s name.
    Enter a new name, and then press Return.

  • Need help with PHP form processor coding

    I posted my first question on this forum earlier today and got help quickly. I'm going to try again and see who can help me this time.
    I have a customer feedback form that I designed and I am using Spry validation on the fields and I'm use Recaptcha as well. Now I'm trying to get the form handler working. I know there are some canned procedures out there but I hate using too much code that I don't understand at all.  I'm sure my first attempt at PHP coding is horrible but we all have to learn. My processor is working in some areas but there are holes I don't know how to fill in:
    1. When I validate the Recaptcha input, if it was entered correctly, I go on to send an email to the appropriate person BUT how do I send them a message and get back to the form if the recaptcha validation fails and still have their entries in place?
    2. Assuming the recaptcha validated correctly, my procedure sends an email  and it writes the comments to a file for historical purposes. These parts seem to be working (by some miracle). Once I do this, I think I would like to open a little window to send the customer a confirmation message, have them click the box to confirm and close the window and then take them back to the feedback form but now have it be reset. I'm not sure how to do these steps.
    Does anyone have a SIMPLE example to accomplish these steps?
    Thanks much!!
    Donna

    It would be hard to give you substantive examples of how to accomplish your goals here without seeing your PHP code, but in general the following methods would work:
    1.  To return to the form with the fields populated, is easiest when the processing script and the form code are on the same page.  The idea is that when the form is not properly completed, you fall back into the form code and use the data from the posted values to repopulate the fields, e.g.,
    <input type="text' name="whatever" value="<?php isset($_POST['whatever']) { echo $_POST['whatever']; ?>">
    or
    <select name="whatever2">
    <option<?php if(isset($_POST['whatever2']) && $_POST['whatever2']=='this_option_value') { echo ' selected="selected"'; } ?>>this_option_value</option>
    </select>
    Each field is set to repeat the posted data (if the corresponding $_POST value is set - to avoid error messages when the page is first loaded).
    2.  You can place the confirmation message on the page with CSS that hides it.  When the form is submitted successfully, just set a variable that is used to show the previously hidden message, e.g.,
    Assume the following CSS -
    #message { display:none; }
    and the following HTML -
    <p id="message">Congratulations</p>
    and the fact that you have set a PHP variable called $success to be true when the form is successfully submitted, you would just modify the HTML like this -
    <p id="message"<?php if($success) { echo ' style="display:block"; } ?>>Congratulations</p>
    Make sense?

  • Need Help with Contact Book to Mysql in Flash

    Hi... this is a lil over my head. If you go to
    www.rampagesoundstudios.com and click on the contacts tab, there is
    a guestbook. I am not that experienced in flash to get this to work
    with the mysql databases on the webserver.
    What I need to have done is when you click the submit button,
    it sends it to a text file, then I would guess to a php script and
    then when I want to retrieve it, have a html file queue the
    database for retrieval.
    Can anyone assist me or teach me how to do this? I would be
    willing to pay you via paypal if needed.
    Please reply off list to ramtazz(at)comcast.net
    Thanks,
    Bill

    Visit gotoandlearn.com. There are a few video tutorials that
    take you thru the process of loading data into Flash.
    The general scheme for a MySQL database is... Flash calls a
    php file that collects the data and writes (echoes) it into an xml
    format which Flash can read using its xml processing function(s).
    Putting new data into the database follows a similar path,
    where Flash sends the variables to a php file and that file places
    the data into the database.

  • Hard problem. need help with contact file (data.syncdb)

    hello everyone. i lost my iphone. i have the data.syncdb file.
    how can i view this?
    if i cannot view it can i send it to someone and they can replace their file on a old iphone (if someone has one) or touch? then they can see the contacts and email them to me? i would paypal you some $$ to help me out. i dont have much just need the contacts bad.
    any help would be great.
    Thanks!

    anyone?

  • Need help with contacting HTTPS URL

    Hi,
    I am new bie to Java Security. I do not know where to start off with. Here is the requirement.
    I need to contact an HTTPS URL and this URL gives me output which is encypted data.
    I have to save this ecnrypted data into a file and I have the KEY to decrypt the data.
    I have tried several ways (all listed below) to get it working. But I am not successful. I get
    "javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found"
    Can you guys give me some insight on how to proceed?
    Thanks
    Mathew
    import java.util.*;
    import java.text.*;
    import java.net.*;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.net.HttpURLConnection;
    import java.net.URL;
    import java.security.Permission;
    import javax.net.ssl.HttpsURLConnection;
    import java.security.*;
    import java.security.cert.*;
    import javax.net.ssl.*;
    import java.io.*;
    public class temp
         protected BufferedReader messageResponseReader;
         private static final String CERTIFICATE_TYPE = "SunX509";
         private static final String KEYSTORE_TYPE = "JKS";
         private static final String SSL_PROTOCOL = "TLS";
         private static final String CERTIFICATE_FACTORY_TYPE = "X.509";
         public static void main(String args[])
              try
                   try{
                             temp tmp = new temp();
                             String url = "https://test.mysite.com/one/perform.jsp?mode=get&check=true";
                             tmp.sendRequest(url);
                        }catch(Exception e)
                             e.printStackTrace();
              catch(Exception e){
                   e.printStackTrace();
    public String sendRequest(String urlString) throws Exception
    StringBuffer response = null;
    BufferedReader messageReader = null;
    try
                   String username = "user";
                   String password = "pwd";
                   String encoding = new sun.misc.BASE64Encoder().encode("username:password".getBytes());
                   //java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
                   //System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
                   // Needed for validation of the server certificate
                   //System.setProperty("javax.net.ssl.trustStore","C:\\cert\\key.txt");
                   // Needed for providing a clint certificate for client authentication
                   //System.setProperty("javax.net.ssl.keyStore","C:\\cert\\key.txt");
                   //System.setProperty("javax.net.ssl.keyStorePassword","te5t1ng");
                   //System.setProperty("ssl.SocketFactory.provider", "com.sun.net.ssl.internal.ssl.Provider");
                   KeyStore ks;
                   ks = KeyStore.getInstance("JKS");
                   CertificateFactory cf = CertificateFactory.getInstance(CERTIFICATE_FACTORY_TYPE);
                   TrustManagerFactory tmf = TrustManagerFactory.getInstance(CERTIFICATE_TYPE);
                   KeyManagerFactory kmf = KeyManagerFactory.getInstance(CERTIFICATE_TYPE);
                   FileInputStream fis = new FileInputStream("C:\\cert\\key.txt");
                   BufferedInputStream bis = new BufferedInputStream(fis);
                   Collection c = cf.generateCertificates(fis);
                   Iterator i = c.iterator();
                   while (i.hasNext()) {
                   java.security.cert.Certificate cert = (java.security.cert.Certificate)i.next();
                   System.out.println(cert);
                   ks.load(null, null);
                   X509Certificate the_cert = (X509Certificate)cf.generateCertificate(bis);
                   ks.setCertificateEntry("server_cert",the_cert);
                   tmf.init(ks);
                   ks = KeyStore.getInstance(KEYSTORE_TYPE);
                   ks.load(null, null);
                   the_cert = (X509Certificate)cf.generateCertificate(new FileInputStream("key.txt"));
                   ks.setCertificateEntry("client_cert",the_cert);
                   kmf.init(ks, null);
                   SSLContext ctx = SSLContext.getInstance(SSL_PROTOCOL);
                   KeyManager[] km = kmf.getKeyManagers();
                   TrustManager[] tm = tmf.getTrustManagers();
                   ctx.init (km, tm, null);
                   HttpsURLConnection.setDefaultSSLSocketFactory(ctx.getSocketFactory());
    urlString = urlString.replaceAll(" ","%20");
    URL url = new URL(urlString);
    //HttpsURLConnection urlCon = (HttpsURLConnection)url.openConnection();
    HttpURLConnection urlCon = (HttpURLConnection)url.openConnection();
    //com.sun.net.ssl.HttpsURLConnection urlCon = (com.sun.net.ssl.HttpsURLConnection)urlCon;
    /*urlCon.setRequestProperty("Host", url.getHost());*/
    urlCon.setDoOutput(true);
    urlCon.setDoInput(true);
    urlCon.setRequestMethod("POST");
    urlCon.setUseCaches (false);
    urlCon.setAllowUserInteraction(true);
    urlCon.setInstanceFollowRedirects(true);
    urlCon.setRequestProperty ("Authorization", "Basic " + encoding);
    //Permission permision = urlCon.getPermission();
    //System.out.println("permission name:"+permision.getName());
    urlCon.connect();
    //messageReader = new BufferedReader(new InputStreamReader(urlCon.getInputStream()));
    //response = new StringBuffer();
    //String line;
    //while((line = messageReader.readLine()) != null){
    // response.append(line);
    // response.append("\n");
    catch (Exception e) {
    e.printStackTrace();
    throw e;
    return "testing";

    sorry for the junk data.. Need to post it again

  • BPEL Need help with Task Form's bindings' Claim

    Hi,
    I have a customer requirement, they want something like, if there is only one member in a group, when he views the task form from webcenter or from the worklist, the task should be automatically claimed, so he doesn't have to claim the task, and then ongo with what the task-form offers.
    I have seen that Claim method comes from the bindings to the taskDetails.jspx, the code is below which auto-claims the task:
    DCBindingContainer binding = (DCBindingContainer)getBindings();
    DCIteratorBinding iter = binding.findIteratorBinding("taskIterator");
    OperationBinding bind = bindings.getOperationBinding("Claim");
    bind.execute();
    However, there are two problems with this approach.
    1) The Task Form isn't getting updated with the buttons that comes after claiming the task(yes-no-approve-reject-whatever).
    2) If the task is allready claimed, there is an exception.
    The second one, I can manage to overcome somehow, but the first one, I am asking you damn it :)
    Any help would be most appreciated!

    Can someone please help?

  • Need help with a form calculation

    I am trying to create a form in Acrobat that will support a calculation of percentages. I have the
    following formula:
    if (a1.value == "" || a1.value == "" && b1.value == "") {c1=0} else {b1/a1}
    The percentage is not calculating and is remaining at 0% when numbers are entered on the form. I am trying to avoid the error messages we receive if we just enter the basic calculation in to the simplified (because some of the cells may have a value of 0).
    Can anyone help?

    Try this:
    // Get the field values
    var v1 = getField("a1").value;
    var v2 = getField("b1").value;
    //. Perform the calculation
    if (v1) {
        event.value = v2 / v1;
    } else {
        event.value = 0;
    Edit: corrected typo

Maybe you are looking for

  • Safari or Firefox won't load on home network

    Hello, My Macbook has been a good computer for a while but 2 days ago the Safari won't open at all. I go to open it and the Safari gives me the spinning ball thing and won't respond. Tried downloading Firefox and still wont work. the thing is though

  • Accessing files in a JAR from an Applet

    I've been stuck trying to get my applet to work online. The applet and its inner classes, as well as a folder with a bunch of text files it needs to run, are all in a jar file (on a geocities website =/ just trying to get it working). My html code fo

  • 5400 rpm or 7200 rpm?

    Will i be able to notice a big difference between the 5400 and 7200 rpm hard drives? If so in what area will this change be noticed?

  • Need Material related to 11g EM

    Hi Every One I need the Book/material or exact documentation please share with me if any one have. Please email me at [email protected] i will be really thankful of you. Enterprise Manager Grid Control [  ]      Explain installation procedur

  • Keyframe using the puppet warp tool in photoshop CS6?

    Is there any extension or way that will allow me to keyframe using the puppet warp tool in photoshop CS6? I'm doing 2d animation, and I need to draw lines that I can immediately animate using puppet warp (you can't draw in after effects).