Send Form Data to PC via USB cabile

Respected SIr/Madam
I want to send Form Data or RMS Data to PC via USB data cabile .
Is it Possible ?
if it is possible then please give me some idea how to make it
thanks in advanse
Souvik

Yes ..
First ensure that driver for the Data cable is installed.
Get the comm port number .
In windows
control panel->Phone & Modem options ->Modems..
The Comm port no for the data cable is present in Attached To column.
In Linux ..
you can get it by checking the Device options
Next
U need to establish a connection between PC & Handset using the comm port.
Note that The comm port obtained here is the reference commport in the PC..
U can get the comm port number in Handset using the J2ME application itself..
String port;
String ports = System.getProperty("microedition.commports");
int comma = ports.indexOf(',');
if (comma > 0) {
// Parse the first port from the available ports list.
port = ports.substring(0, comma);
} else {
// Only one serial port available.
port =ports;
/*Below is a code example showing how you can use serial I/O API to open a connection and read/write
to it. */
//using commconnection since midp2.0
CommConnection commConn =
(CommConnection)Connector.open("comm:COM0;baudrate=115200", Connector.READ_WRITE,
true);
InputStream iStream = commConn.openInputStream();
OutputStream oStream = commConn.openOutputStream();
String sMessage = "send";
oStream.write(sMessage.getBytes());
Thread tRead = new Thread() {
public void run() {
while (true) {
StringBuffer sb = new StringBuffer();
while(true) {
int c = iStream.read();
if(c != '\r') {
sb.append((char)c);
else
break;
try {
sleep(1000);
catch (InterruptedException e) {}
tRead.start();For some handsets that do not support CommConnection, you can use StreamConnection in place of
CommConnection with the same result:
StreamConnection commConn =
(StreamConnection)Connector.open("comm:COM0";baudrate=115200"); The above code is for J2me application running on Handset ...
In PC you can refer it using the comm port identified from the Control Panel.

Similar Messages

  • Send form data from Coldfusion to ASP

    I need to send form data from CF to ASP.
    I submit a CF page and validate it on my end with another CF
    page, which then needs to post the results to an asp page on
    another site. The post has to be sent via SSL and I don't need to
    and cannot receive any status message back from the remote ASP
    site. Any suggestions would be greatly appreciated. I was thinking
    some type of cfhttp, but I am not very familiar with its usage.
    Thanks!

    It doesn't matter what type of page you are sending to as
    long as it can handle the data that is sent. Either a form or
    cfhttp will work.

  • R/3(sends IDOC data)  to IBMMQ via XI.

    Hi,
    My requirement is R/3(sends IDOC data)  to IBMMQ via XI.
    I need to sent up Integration Builder: design as well as configuration.
    Can anyone send me a document which describes a complete end to end scenario?
    I have seen the forum and the blogs but none decsribe the complete end-to-end scenario.
    Plz reply at the earliest.
    Regards,
    Mateen.

    <i>My requirement is R/3(sends IDOC data) to IBMMQ via XI.</i>
    >>>
    there is no document as sucj available on SDN that will help u implement the above scenario. But you can have help on
    1. sending the IDoc to  XI - Ref: https://wiki.sdn.sap.com/wiki/display/XI/SAPR3%28Idocs%29ToXI--Steps+Summarized
    2. IBMMQ - you will have to use the JMS adapter. To receive help on configuring the receiver JMS adapter ref: http://help.sap.com/saphelp_nw04/helpdata/en/10/b1b4c8575a6e47954ad63438d303e4/content.htm

  • Send form. data from standalone pdf to LC Forms

    Hello,
    I am new in Adobe LC ES platform and would like to ask for advice with following.
    I need to provide user with a standalone pdf form, user should then be able to fill the form and send it to LiveCycle Forms server.
    I originally thought that easiest way to implement it is via SOAP, but I have not been able to make some working HelloWorld example. I have red some articles that suggests some workarounds (pdf form -> webserver -> SOAP to LC server; or to use coldFusion).
    Is there any tutorial or example which would describe posting of form to LiveCycle forms, when not using LC Workspace (not over mail or watched folders) ? Or what way would you suggest to deal with this ?
    Do I need reader-enable form to make SOAP call to store form data by Reader?
    Thanks.

    It looks, that using web services may be after all most suitable for task needs.
    Perhaps last problem I have is to properly bind pdf form  to a process variable.
    I need to send pdf form to some livecycle process, which would store form entries to database. I am trying it in this way:
    - as a process start poin is defined [Set Value] service with execute action.
    - there is defined input, process, required variable "form" of type xfaForm with associated template-url pointing to mentioned .pdf form
    - in [Set Value] service it is only asserted some parts of "form" variable to another process variables
    tests:
    If I run process via wokbench (right-click on swim line + ivoke process), it returns job-id and values are stored in db (internal adobe table created for this process). But if I send (soaps) directly the pdf form and sniff the response packet, there is :
    <faultstring>
    The input BLOB object should have attachmentID, remoteURL, or binaryData field specified.
    </faultstring>
    ... and nothing is stored to db.
    Am I doing wrong mapping (wrong variable type? wrong assertion? ) or is this way bad completely.
    I have searched some article about the process side of WS binding, but haven't found nothing for LC 8.2.
    Thanks for advice.

  • CDOSYS  sending Form Data

    I have tried every combination of trying to get form data
    sent in an email without any luck.
    objMail.txtEmail = Request.Form("Email")
    or
    objMail.txtEmail = Request("Email")
    If I take out the form elements I can get the system to send
    me a hardcoded email
    Can ANYONE tell me how to add a form variable into an email
    using CDOSYS.
    I am trying to use this as part of an insert, for members who
    add thier details to our database I want to be able to send an
    email to someone to be aware who has just been added.
    I rely need an answer to this...I have to get this up and
    running tomorrow
    When answering, can you advise were abouts in the script
    elements should be placed.
    ANY help would be appreciated

    i have had luck with this email code
    place before your insert record coding
    <%
    Dim ObjSendMail
    Set ObjSendMail = CreateObject("CDO.Message")
    'This section provides the configuration information for the
    remote SMTP server.
    ObjSendMail.Configuration.Fields.Item ("
    http://schemas.microsoft.com/cdo/configuration/smtpserver")
    ="127.0.0.1"
    ObjSendMail.Configuration.Fields.Item ("
    http://schemas.microsoft.com/cdo/configuration/smtpserverport")
    = 25
    ObjSendMail.Configuration.Fields.Item ("
    http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
    = 60
    ObjSendMail.Configuration.Fields.Update
    'End remote SMTP server configuration section==
    if Request.Form("Submit1") = "Send Form" then
    ObjSendMail.To = Request.Form("textfield")
    ObjSendMail.CC = "[email protected]"
    ObjSendMail.BCC = "[email protected]"
    ObjSendMail.Subject = "RE:golf tournament entry form is
    attached"
    ObjSendMail.From = "[email protected]"
    ' we are sending a text email.. simply switch the comments
    around to send an html email instead
    'ObjSendMail.HTMLBody = Request.Form("textfield")
    ObjSendMail.TextBody = ObjSendMail.TextBody &
    cStr(Request.Form("textfield"))
    ObjSendMail.TextBody = ObjSendMail.TextBody & "" &
    vbCrlf & ""
    ObjSendMail.TextBody = ObjSendMail.TextBody & "Thank you
    for entering this years Panhandle Charitable Open"
    ObjSendMail.TextBody = ObjSendMail.TextBody & "" &
    vbCrlf & ""
    ObjSendMail.TextBody = ObjSendMail.TextBody & "Entry form
    is attached"
    ObjSendMail.TextBody = ObjSendMail.TextBody & "" &
    vbCrlf & ""
    ObjSendMail.TextBody = ObjSendMail.TextBody & "Please
    print form, fill out and mail in with your entry fee"
    ObjSendMail.TextBody = ObjSendMail.TextBody & "" &
    vbCrlf & ""
    ObjSendMail.TextBody = ObjSendMail.TextBody & "" &
    vbCrlf & ""
    ObjSendMail.AddAttachment Server.MapPath("/entryform.doc")
    ObjSendMail.Send
    Set ObjSendMail = Nothing
    end if
    %>

  • Send form data via email after posting to MySQL database

    I have created a form in DreamweaverMX 2004 and then tied it to mySQL database so that on submit the data posts to the database.
    This works fine. It also goes to a "success" page just fine. I then added in some php code to also email a few of the fields from the form to a specific email address. This functions correctly using this code below (the email does go - the "from" email address has my login for MySQL database) EXCEPT that the data from the fields does not come through. The field labels are there as indicated below and the email is formatted correctly, but the data doesn't come through.
    mail( $to = "[email protected]", $subject = "Someone has submitted an application",
    $content= "Essay 1: ".$Essay1."\r\n"
    ."Essay 2: ".$Essay2."\r\n"
    ."Essay 3: ".$Essay3."\r\n"
    ."Essay 4: ".$Essay4."\r\n"
    ."Essay 5: ".$Essay5."\r\n");
    What am I doing wrong?
    That's problem #1 - then problem #2 is that I actually also need to send the ID code in this email for the specific record which has been created in my database so the end recipient can associate the email with that specific ID later for other purposes. So even if I figure out problem #1, I'm not sure that I can use this code for problem #2 because the field isn't on the html form, but actually created by the database upon submission.
    Any suggestions would be helpful!
    Thanks

    Moved to the Dreamweaver Application Development forum, which deals with PHP and other server-side issues.

  • Can't send Mail since internet connection via USB key

    I now access internet via a USB key and although I receive mail as normal into my Mac 'Mail' from my email account when on line, all mail I now try to send sits in the outbox with the following error message:
    This message could not be delivered and will remain in your Outbox until it can be delivered.
    5.7.1 service refused. Client host 80.10.46.95 blocked for spamming issues. Adresse IP source
    80.10.46.95 bloquee pour incident de spam. Ref http://r.orange.fr/r/Oassistance_adresserejetee .
    I presume since changing my way of connecting to the internet it has thrown up some server problem and I need to change something in my preferences on Mail...but what?
    Any help would be appreciated as it's driving me mad!
    Many thanks.

    Hi Han71, and a warm welcome to the forums!
    Start with these three, check SpamCop or SpamHaus to see if your IP is there...
    http://spamcop.net/bl.shtml
    http://www.spamhaus.org/lookup.lasso
    http://www.spamhaus.org/zen/
    Sometimes an ISP will bloc a whole other ISP too, if it's the source of too much SPAM.
    Might also see this post by Gallomimia...
    http://discussions.apple.com/message.jspa?messageID=9465359#9465359

  • Send form data from Java class

    Hi Guys,
    Is it possible to send data using a Java class to a URL?
    Thanks

    Yes, but XML has nothing at all to do with that. Google for "java url tutorial".

  • Sending form data to a specific email address

    I have a form on an html page, and i would like to parse and process the information and send it to a specific email address.
    So far i have the information from the html page sent to a jsp page to format it a certain way. But then, how can i send it as an email message? Is there any command in the JSP spec that will allow me to do this? If not, what are my options and can you please point me to the right directions?
    Thanks
    Englebert Sarmiento

    There are a few ways to send an email in JSP. Some options are:
    - Use the JavaMail library. Search Sun's site and you'll find a tutorial on how to program with JavaMail.
    - Jakarta has a tag in its open source tag library for sending email (http://jakarta.apache.org).
    - Use a commercial library such as dotJ (http://www.dotjonline.com).

  • How do I send string data into DIAdem via a channel?

    Using a TO.DATASHEET reference, ChnValSet doesn't work with strings. It's fine with numbers and dates, just not strings. I'm not sure if the CHT variable is useful for me or not. Thanks.

    Hi Deca,
    You can use the CmdExecuteSync method of the DIAdem.TOCommand interface to set the value of a text channel. For example passing the string "CHT(1,1) := 'test'" as a parameter to the CmdExecuteSync method will set the 1st row of the 1st channel to "test". Please refer to the DIAdem help for more documentation on the CHT function.
    I hope this helps! Please post back if I wasn't clear enough in explaining how to do this or if you have any problems getting it to work.
    Regards,
    Sarah Miracle
    National Instruments

  • Send Form made in CRMD_EMAIL via action

    Hi all,
    I've created an action that creates and mails a Smartform once the transaction is error-free and saved. This works fine, but I would like to mail a Mail Form instead of a Smartform. When I replace the Order Confirmation-smartform with one I created in CRMD_EMAIL in the action, it does not execute the action anymore. I get the following errors:
    Form Z_TEST or function module for form does not exist
    Document not sent to
    Action could not be successfully executed
    In which Z_TEST is my Mail Form (CRM Form). The Message No. is SPPF_MEDIA015.
    Can someone tell me if and how I can solve this? Is there another method I should use instead of Smartform Mail in the action, or does this have to be written?

    Hi.
    Would appreciate if you could share the information as to how you solved this problem.
    We also want to implement something similar and would highly appreciate if you could share the information.
    Thanks
    Rakesh Jain.

  • N95 crashes in Data transfer via USB cable, help?

    I ve been using my N95 with no problems for more than a year. Sometime ago I bought a new 8Gb Micro SDHC memory card, it was recognised by the phone and worked perfectly. But after the card was stored with data for more than 1gb, the phone crashes everytime I try to copy even the smallest file on the memory card through Data transfer mode via USB cable. Than I try to copy a file an error message is displayed in Windows XP and the phone reboots. The strangest thing that I can copy without a problem even a 500 mb movie file to the phone if the stored space on the memory card is say like 985mb, but after that it will crash even with the copying a 10 kb text file.
    Any help would be appreciated.

    No, its not the file system or Memory card itself - cause transfering a data through a card reader works fine and the phone recognize correctly everything transfered. Can it be the case of USB cable driver? May be I need to install it or go for a newer version? BTW, I removed Nokia PC Suite from my notebook - cause I dont used it much, but this program still used a lot of my PC resources without asking to. I belive that PC Suite is not nesessary for using the phone through a Data Transfer mode?

  • Data sending form

    Hi,
    I posted recently and no one responded, I had a question about form sending data to email. Anyway since no one could help me with my code I was wondering if someone had some working code which sends form data to an email address. It doesn't matter what your back end is.
    Thanks for reading.

    Hi,
    I've got a couple clarifying questions.
    1. Which version of teaming are you on?
    2. You want to send one of your custom fields from a custom entry out in the notification, correct? Or you just want a link back to the entry?
    Thanks,
    Bill Ramsey
    Novell

  • Is this (mail sending form) code right ?

    I'm not a developer , my boss gave me this php code for sending form data to his mail ..
    is this code right cuz it doesn't seem to work fine ?
    <? php
    $to = "[email protected]";                                                                                                                     
    $cc = "[email protected]";                                                                                                                     
    $bcc = "";                                                                                                                     
    $subject = "Tailor Request Form";                                                                                                                     
    $msg = "                                                                                                      
    <table border=\"1\" width=\"600\">
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Titel</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$title."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Name</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$name."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Country</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$country."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Phone</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$phone."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>E-mail</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$Email."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Tour Package</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$TravelType."</td>
    </tr>
    </table>";                                
    $from = "From: ".$_POST['Email'];                                                    
    $html = "Content-Type: text/html";                                                    
    $headers = $html."\r\n".$from."\r\n".$cc."\r\n".$bcc."\r\n";                                                    
    //$headers .= "cc: [email protected]\r\n";                                                    
    mail($to, $subject, $msg, $headers);?>

    <?php
    $to = "[email protected]";                                                                                                                      
    $cc = "[email protected]";                                                                                                                      
    $bcc = "";                                                                                                                      
    $subject = "Tailor Request Form";                                                                                                                      
    $msg = "                                                                                                               
    <table border=\"1\" width=\"600\">
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Titel</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$title."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Name</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$name."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Name</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$last_name."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Country</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$country."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Phone</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$phone."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Fax</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$fax."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>E-mail</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$Email."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Tour Package</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$TravelType."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Transportation</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$DTransportation."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Number Of Persons</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$NumberofPersons."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Number Of Children</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$NumberofChildren."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Single Room</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$SingleRoomNo."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Double Room</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$DoubleRoomNo."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Twin Room</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$TwinRoomNo."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Triple Room</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$TripleRoomNo."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><b><font face=\"Verdana\" color=\"#000000\" size=\"2\">1<sup>st</sup> City of Interest</font></b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$CitiesToVisit1."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><b><font face=\"Verdana\" color=\"#000000\" size=\"2\">2<sup>nd</sup> City of Interest</font></b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$CitiesToVisit2."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><b><font face=\"Verdana\" color=\"#000000\" size=\"2\">4<sup>th</sup> City of Interest</font></b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$CitiesToVisit4."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><b><font face=\"Verdana\" color=\"#000000\" size=\"2\">5<sup>th</sup> City of Interest</font></b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$CitiesToVisit5."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Between Aswan and Luxor</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$TransportationFromAswanToLuxor."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Preferable Arrival Dates</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$ArrivalDay." - ".$ArrivalMonth." - ".$ArrivalYear."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Preferable Departure Dates</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=lift><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$DepartureDay." - ".$DepartureMonth." - ".$DepartureYear."</td>
    </tr>
    <tr>
    <td width=230 valign=\"middle\" align=\"right\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=right><font face=\"Verdana\" color=\"#000000\" size=\"2\"><b>Special Interests</b></td>
    <td width=370 valign=\"middle\" align=\"left\"><p style=\"MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px\"
    align=justify><font face=\"Verdana\" color=\"#000000\" size=\"2\">".$SpecialInterests."</td>
    </tr>
    </table>";                                
    $from = "From: ".$_POST['Email'];                                                    
    $html = "Content-Type: text/html";                                                    
    $headers = $html."\r\n".$from."\r\n".$cc."\r\n".$bcc."\r\n";                                                     
    //$headers .= "cc: [email protected]\r\n";                                                    
    mail($to, $subject, $msg, $headers);                                   
       ?>
    <!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=utf-8" />
    <title>Delta Tours Egypt</title>
    <style type="text/css">
    </style>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="wrapper">
      <div id="header"></div>
      <div id="menu">
        <ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a href="about_egypt/about_egypt.html" class="MenuBarItemSubmenu">About Egypt</a>
            <ul>
              <li><a href="about_egypt/people.html">People</a></li>
              <li><a href="about_egypt/climate_clothes.html">Climate &amp; Clothes</a></li>
              <li><a href="about_egypt/transportation.html">Transportation</a></li>
            </ul>
          </li>
          <li><a href="cities_info/cities_info_main.html" class="MenuBarItemSubmenu">Cities Info</a>
            <ul>
              <li><a href="#">Cairo</a></li>
              <li><a href="#">Luxor</a></li>
              <li><a href="cities_info/aswan.html">Aswan</a></li>
              <li><a href="cities_info/red_sea.html">Red Sea</a></li>
              <li><a href="cities_info/sinai.html">Sinai</a></li>
              <li><a href="#">Oasis</a></li>
            </ul>
          </li>
          <li><a href="#">Hot Deals</a>      </li>
          <li><a href="#">Tailor Mode</a></li>
          <li><a href="about_us/about_us.html">About Us</a></li>
          <li><a href="contact_us.html">Contact Us</a></li>
        </ul>
      </div>
      <div id="mainMenu">  <ul>
    <li><a href="index.html">Home</a></li>
    <li><a href="tours/tours_main/classical_tours.html">Tours</a></li>
    <li><a href="hotels/hotels_home.html">Hotels</a></li>
    <li><a href="#">Cruises</a></li>
    </ul></div>
      <div id="content">
       <div id="conTop"></div>
       <div id="conBg">
          <div id="spotlight">
           <p><strong><em>Your information has been submitted <br />
            one of our operators will contact you within<br />
    24 hours for further details </em></strong></p>
    <h5 class="signature"><em><strong>Delta Tours Team </strong></em></h5>
                  <br class="clear" />
         </div>
         </div><div id="conBot"></div>
    </div>
         <div id="footer">
      <div id="footerTop"></div>
      <div id="footerMid">
        <p>Home | Tours | Hotels | Cruises | About Egypt | Cities Info | Monuments & History | Hot Deals | Tailor Made | About Us | Contact Us | links</p>
        </div>
      <div id="footerBot"></div>
      </div>
    <div id="copyRight">deltatoursegypt.com © 2012 .All rights reserved.</div></div>
    </div>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
    </body>
    </html>

  • Servlet form data to mySQL DB

    Hi,
    I am creating a registration page for a small web app. I have been looking online and cant find much on how to send form data from a servlet to the appropriate table in my mySQL database. I have already designed my DB and know pretty much how to establish a connection to my DB. Any suggestions? Thanks for the help!

    Google for jdbc tutorial.
    I'd write a servlet that getParameter()'s the values, checks they are ok (-> redirect to error JSP page if not), then does the JDBC call, finally shows a "thanks" JSP. Put the JDBC stuff in a separate class, not in the servlet, so you can test it with a small main() function (or junit, but you don't have to learn everything at once, google for junit later.)
    If you want to be buzzword compatible, write a class:
    class RegistrationInfo
        private String name, password;
        boolean parse(HttpServletRequest, HttpServletResponse) {
            // Parse from request.
            // If bad parameters, redirect to error and return false.
            // Alternately, you can make parse() into a sort of a "factory": static RegistrationInfo parse()
        public void insert() { ...insert this using JDBC... }
    }With the above bit as "model", JSP as "view", and the servlet as "controller", you are MVC right there. Some people like to separate the JDBC stuff to its own class; do that if appropriate (useful if you need to support several SQL dialects, sort of non-OO otherwise (flame me! flame me!)).

Maybe you are looking for