Add a word before form input (PHP)

Normally I would work this out fo rmyself but I'm up against
the clock this time so here goes:
I have a form which updates a text field in a MYQSL databse.
what I'd like to do is add the word "All," and the comma a the same
time, to enable a search.
here is the line which I think carries the cateegory but can
anyone help me amend it so it adds the word all and the comma at
the same time?
GetSQLValueString($_POST['category'], "text"),
Failing that, is there a way I can automatically have the
word All, insterted in every new row in the MySQL table?
Cheers
Dave

On 17 Oct 2006 in macromedia.dreamweaver.appdev, davecheet
wrote:
> GetSQLValueString($_POST['category'], "text"),
Try this:
GetSQLValueString('All, ' . $_POST['category'], "text"),
That will do what you asked; if it's not what you want,
you'll have to
post more code. It also includes an embedded space; amend as
needed.
"." (dot/period/full stop/0x2e) is the PHP concatenation
operator.
Joe Makowiec
http://makowiec.net/
Email:
http://makowiec.net/email.php

Similar Messages

  • Fck add /div 's into form input

    I'm using fck editor to allow my users to upload new blogs,
    however, it keeps trying to close and open <div>s where i
    don't want it to...
    Is there a regular expression that can remove all
    <div>s from the code? I don't know what I'm doing with
    regular expressions so don't know where to start.

    > I've decided that I
    > want to add another <div> so I got fancy and put a
    </div><div> inside the
    > editable area.
    Don't get fancy. You cannot nest things within editable
    regions like that.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "steal5" <[email protected]> wrote in
    message
    news:fjpdho$pmu$[email protected]..
    >I am having troubles coding up pages from templates. I've
    got one area
    >where
    > I've made the contents of a <div> as the editable
    area but I've decided
    > that I
    > want to add another <div> so I got fancy and put a
    </div><div> inside the
    > editable area. Dreamweaver doesn't appear to like this
    and I don't know
    > why
    > since it works just fine in the browser. What's up with
    this? I is just
    > because what's in the editable area isn't well-formed
    for editing in the
    > WYSIWYG editor?
    >
    > <div id="TopLeft" class="top_left_media">
    > <!-- InstanceBeginEditable name="Images" -->
    > <img src="../../images/img1.jpg" alt="" width="320"
    height="240" />
    > </div>
    > <div style="display:none;" id="img_2"
    class="top_left_media">
    > <img alt="" src="../../images/img2.jpg" width="320"
    height="240" />
    > <!-- InstanceEndEditable -->
    > </div>
    >

  • Trying to add a word at the end of a link tag sitewide

    I'm trying to add a word before the closing qoute in all links sitewide. Any way to do this without doing each link on all pages separately?

    I have tested this on a simple page, so I'm confident it will do what you want, but before proceeding, you must make a backup of your site in case anything goes wrong.
    Open the Find and Replace dialog box (Edit menu or Ctrl+F/Cmd+F).
    Set "Find in" to "Current Document".
    Set "Search to "Source Code".
    In the "Find" field, add the following regular expression:
    (<a[\s\S]*? href\s?=\s?("|')[\s\S]+?)\2
    In the "Replace" field add the following (replace "new_text" with the text you want to add to each link):
    $1new_text$2
    Select the "Use regular expression" check box.
    Test that it works by clicking Find Next followed by Replace.
    If you're happy that it's working as expected, change "Find in" to "Entire Current Local Site", and click "Replace All".
    Dreamweaver will warn you that you cannot undo changes in pages that aren't currently open. If you're happy, click OK, and the change will be made to all links.

  • Add SOAP header before the WebService request (Windows Forms)

    I have to add this header before my Request:
    <h:FordDealerIdentity xmlns:h="urn:ford/star/security/v1.0" xmlns="urn:ford/star/security/v1.0">
    <soapenv:Header>
    <SiteCode>SZBRA</SiteCode>
    </soapenv:Header>
    </h:FordDealerIdentity>
    My request:
    var srv = new ConsumerServiceScheduleV1();
    var a = new RetrieveScheduleRequestType();
    var b = new DealerType();
    var c = new ScheduleType();
    srv.Credentials = new System.Net.NetworkCredential("","SZBRA05168");
    //ScheduleType[] ret;
    b.Code = 05168;
    b.Name = "BraconCampos";
    a.Dealer = b;
    a.SchedulingFrom = new DateTime(10/10/2014);
    a.SchedulingTo = new DateTime(15/10/2015);
    c.SchedulingCategory = SchedulingCategoryType.Regular;
    srv.ClientCertificates.Add(new System.Security.Cryptography.X509Certificates.X509Certificate2(@"E:\Agenda Ford\Certificados Agend@Ford\BracomCampos.pfx", "qaz123"));
    textBox1.Text = srv.RetrieveSchedule(a).ToString();

    Is Windows Forms! :)
    And what forum deals with SOAP and Web services more than any other forum?  Many types of client based applications such as  Windows form, WPF, Sliverlight, Windows service classlib project like a BLL and so forth deal sith SOAP and WEB.
    How is what you are talking about a Windows forms issue?
    My Application is Windows Forms. I need to know how to insert this header before request.

  • I have a column in a Numbers document that currently only contains a number--the numbers are different in different columns.  Before each number I want to add the words "Pack Qty."  How would I do this?

    I have a column in a Numbers document that currently contains a number and that number is different in different columns.  I want to add the words "Pack Qty" before each number in the column.  How do I do that?  I'm using Numbers '09 on a brand new Macbook Pro.  Thanks!

    In an adjacent column add the formula:
    ="Pack Qty: "&<CELL>
    where <CELL> is the cell in the same row where the quantity is,
    Like:
    E2="Pack Qty: "&D2
    select, and hold,  the little circle at the bottom right corner of the selction, then drag down

  • Contact form-checkbox PHP coding doesnt work

    I am a beginner to web page design so i would be grateful if you can explain to me what PHP coding i would need for 'Checkbox' and where to place it in the PHP coding below. I can submit the form to my email with all the headings and the filled in forms with checkbox Yes or No.
    Only problem i have is that part of the check box info appear right at the top of the email message rather than the 'Name', 'Tel', 'Email' etc..Another half of the checkbox appear where it suppose to be wih double heading as shown below. I would also like to remove the <br> from the email message. Can you also tell me how to change the colour for heading so its clear.
    I have marked the checkbox code in BLUE for both HTML and PHP coding below. Sorry for the long coding. Look forward to hearing from someone. Much appreciated.
    Message delivered to the email address as received:
    Rear ground extension: Yes
    Two-storey rear extension: Yes
    Two-storey side extension: No
    Loft: Yes
    New Build: Yes
    Other: Yes
    Name: Test<br>
    Email: [email protected]<br>
    Contact No: 87576as<br>
    Address1: addy1<br>
    Address2: addy2<br>
    Town: town<br>
    County: county<br>
    Postcode: post<br>
    Property Type: Cottage<br>
    Property Area: None<br>
    Message:<br>
    test msg
    My HTML coding for the form:
    <div class="contactForm">
          <form id="form1" name="form1" method="post" action="test2.php">
            <fieldset>
              <legend><strong>Personal Information</strong></legend>
              <table width="690" border="0">
                <tr>
                  <td width="340"><p>
                <label for="name" class="contactLable">Name:</label>
                <input name="name" type="text" id="name" tabindex="10" size="30" />
              </p></td>
                  <td width="340"><p>
                <label for="contact_number" class="contactLable">Contact No:</label>
                <input name="contact_number" type="text" id="contact_number" tabindex="20" size="30" />
              </p></td>
                </tr>
              </table>
              <table width="690" border="0">
                <tr>
                  <td><p>
                <span id="sprytextfield1">
                <label for="email" class="contactLable">Email:</label>
                <input name="email" type="text" id="email" tabindex="30" size="30" />
              <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span> </p></td>
                </tr>
              </table>
            </fieldset>
            <fieldset>
              <legend><strong>Project Information</strong></legend>
              <p><table width="690" border="0">
      <tr>
        <td width="340"><p>
                <label for="address1" class="contactLable">Address 1:</label>
                <input name="address1" type="text" id="address1" tabindex="40" size="30" />
              </p></td>
        <td width="340"> <p>
                <label for="address2" class="contactLable">Address 2:</label>
                <input name="address2" type="text" id="address2" tabindex="50" size="30" />
              </p></td>
      </tr>
      <tr>
        <td><p>
                <label for="town" class="contactLable">Town:</label>
                <input name="town" type="text" id="town" tabindex="60" size="30" />
              </p></td>
        <td><p>
                <label for="county" class="contactLable">County:</label>
                <input name="county" type="text" id="county" tabindex="70" size="30" />
              </p></td>
      </tr>
      <tr>
        <td><p>
                <label for="postcode" class="contactLable">Post Code:</label>
                <input name="postcode" type="text" id="postcode" tabindex="80" size="10" />
              </p></td>
        <td> </td>
      </tr>
      <tr>
        <td><p>
                <label for="propertyType" class="contactLable">Property Type:</label>
                <select name="propertyType" id="propertyType" tabindex="90">
                  <option>Please select</option>
                  <option>Detached</option>
                  <option>Semi-Detached</option>
                  <option>End of Terrace</option>
                  <option>Mid-Terrace</option>
                  <option>Flat</option>
                  <option>Bungalow</option>
                  <option>Cottage</option>
                  <option>Other</option>
                </select>
              </p></td>
        <td><p>
                <label for="propertyArea" class="contactLable">Property Area:</label>
                <select name="propertyArea" id="propertyArea" tabindex="100">
                  <option>Please select</option>
                  <option>None</option>
                  <option>Listed Building</option>
                  <option>Conservation Area</option>
                </select>
              </p></td>
      </tr>
    </table>
    </p>
           </fieldset><fieldset><legend><strong>Project Type</strong></legend>
              <table width="690">
                <tr>
                  <td width="338"><label>
                    <input name="rearExt" type="checkbox" class="contactCheckbox" id="CheckboxGroup1_0" tabindex="110" value="rearExt"/>
                  Rear ground extension</label></td>
                  <td width="340"><input name="sideExt" type="checkbox" class="contactCheckbox" id="CheckboxGroup1_1" tabindex="120" value="sideExt"/>
    Side ground extension</td>
                </tr>
                <tr>
                  <td><input name="twoStoreyRear" type="checkbox" class="contactCheckbox" id="twoStoreyRear" tabindex="130" value="twoStoreyRear"/>
    Two-storey rear extension</td>
                  <td><input name="twoStoreySide" type="checkbox" class="contactCheckbox" id="twoStoreySide" tabindex="140" value="twoStoreySide"/>
    Two-storey side extension</td>
                </tr>
                <tr>
                  <td><input name="loft" type="checkbox" class="contactCheckbox" id="loft" tabindex="150" value="loft"/>
    Loft conversion </td>
                  <td><input name="newBuild" type="checkbox" class="contactCheckbox" id="newBuild" tabindex="160" value="newBuild"/>
    New build </td>
                </tr>
                <tr>
                  <td><input name="flat" type="checkbox" class="contactCheckbox" id="flat" tabindex="170" value="flat"/>
    Flat conversion</td>
                  <td><input name="other" type="checkbox" class="contactCheckbox" id="other" tabindex="180" value="other"/>
    Other conversion</td>
                </tr>
              </table>
            </fieldset>
            <fieldset><legend><strong>Message</strong></legend>
              <p>
                <label for="message" class="contactLable">Your Message or Comments:</label>
                <textarea name="message" id="message" cols="45" rows="5" tabindex="190"></textarea>
              </p>
            </fieldset>
            <br />
            <input type="submit" name="Sumbit" id="Sumbit" value="Submit" tabindex="200" />
          </form>
        </div>
    PHP Coding to send to my email:
    <!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" />
    <META HTTP-EQUIV="refresh" content="0;URL=thankyou.html">
    <title>Email Form</title>
    </head>
    <body>
    <?php
      $name=addslashes($_POST['name']);
      $contact_number=addslashes($_POST['contact_number']);
      $email=addslashes($_POST['email']);
      $address1=addslashes($_POST['address1']);
      $address2=addslashes($_POST['address2']);
      $town=addslashes($_POST['town']);
      $county=addslashes($_POST['county']);
      $postcode=addslashes($_POST['postcode']);
      $propertyType=addslashes($_POST['propertyType']);
      $propertyArea=addslashes($_POST['propertyArea']);
      $rearExt=($_POST['rearExt'])?"Rear ground extension: Yes":"Rear ground extension: No";
      $sideExt=($_POST['sideExt'])?"Side ground extension: Yes":"Side ground extension: No";
      $twoStoreyRear=($_POST['twoStoreyRear'])?"Two-storey rear extension: Yes":"Two-storey rear extension: No";
      $twoStoreySide=($_POST['twoStoreySide'])?"Two-storey side extension: Yes":"Two-storey side extension: No";
      $loft=($_POST['loft'])?"Loft: Yes":"Loft: No";
      $newBuild=($_POST['newBuild'])?"New Build: Yes":"New Build: No";
      $flat=($_POST['flat'])?"Flat: Yes":"Flat: No";
      $other=($_POST['other'])?"Other: Yes":"Other: No";
      $msg.="\n$rearExt\n$wsideExt\n$twoStoreyRear\n$twoStoreySide\n$loft\n$newBuild\n$wflat\n$ other";
      $message=addslashes($_POST['message']);
    // you can specify which email you want your contact form to be emailed to here
      $toemail = "[email protected]";
      $subject = "From Website Test";
      $headers = "MIME-Version: 1.0\n"
                ."From: \"".$name."\" <".$email.">\n"
                ."Content-type: text/html; charset=iso-8859-1\n";
      $body = "Name: ".$name."<br>\n"
                ."Email: ".$email."<br>\n"
                ."Contact No: ".$contact_number."<br>\n"
                ."Address1: ".$address1."<br>\n"
                ."Address2: ".$address2."<br>\n"
                ."Town: ".$town."<br>\n"
                ."County: ".$county."<br>\n"
                ."Postcode: ".$postcode."<br>\n"
                ."Property Type: ".$propertyType."<br>\n"
                ."Property Area: ".$propertyArea."<br>\n"
                ."Rear ground extension: ".$rearExt."<br>\n"
                ."Side ground extension: ".$sideExt."<br>\n"
                ."Two-storey rear extension: ".$twoStoreyRear."<br>\n"
                ."Two-storey side extension: ".$twoStoreySide."<br>\n"
                ."Loft conversion: ".$loft."<br>\n"
                ."New build: ".$newBuild."<br>\n"
                ."Flat: ".$flat."<br>\n"
                ."Other: ".$other."<br>\n"
                ."Message:<br>\n"
                .$message;
      if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
        echo "That is not a valid email address.  Please return to the"
               ." previous page and try again.";
        exit;
        mail($toemail, $subject, $body, $msg, $headers);
        echo "Thanks for submitting your comments";
    ?>
    </body>
    </html>

    Dear David
    Thank you so much for the clear explanation. I have been using Lynda.com Dreamweaver CS5 tutorial. I found the coding for checkbox through search and added to the coding from Lynda.com tutorial.
    I made few changes to the coding by removing:
    $msg = "$rearExt<br>\r\n$sideExt<br>\r\n$twoStoreyRear<br>\r\n
              $twoStoreySide<br>\r\n$loft<br>\r\n$newBuild<br>\r\n$flat<br>\r\n$other\r\n";
    as the email message shows the results from the checkbox twice.
    I also removed the <br> from:
    $body = "Name: $name<br>\r\n
              Email: $email<br>\r\n
              Contact No: $contact_number<br>\r\n
             Other: $other\r\n
              Message:\r\n
                $message";
    I have add the result and the PHP coding you have helped to fixed for anyone needing a working PHP code containing Text Fields, Drop Down List, Checkbox and Text Area. Many thanks for all your help. If you have a coding to change the heading text colour I very much appericate it.
    Message sent to email:
              From: Name test <[email protected]>
                 Content-type: text/html; charset=iso-8859-1
    Name: Name test
              Email: [email protected]
                      Contact No: 0123456789
                      Address1: addy1
                      Address2: addy2
                      Town: T
                      County: C
                      Postcode: P/C
                      Property Type: End of Terrace
                      Property Area: Listed Building
                      Rear ground extension: Rear ground extension: No
                     Side ground extension: Side ground extension: No
                     Two-storey rear extension: Two-storey rear extension: Yes
                     Two-storey side extension: Two-storey side extension: No
                     Loft conversion: Loft conversion: No
                     New build: New Build: No
                     Flat: Flat: Yes
                     Other: Other: No
             Message:
               Test message
    PHP coding for customer contact page:
    <!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" />
    <META HTTP-EQUIV="refresh" content="0;URL=thankyou.html">
    <title>Email Form</title>
    </head>
    <body>
    <?php
      $name=$_POST['name'];
      $contact_number=$_POST['contact_number'];
      $email=$_POST['email'];
      $address1=$_POST['address1'];
      $address2=$_POST['address2'];
      $town=$_POST['town'];
      $county=$_POST['county'];
      $postcode=$_POST['postcode'];
      $propertyType=$_POST['propertyType'];
      $propertyArea=$_POST['propertyArea'];
      $rearExt= isset($_POST['rearExt'])?"Rear ground extension: Yes":"Rear ground extension: No";
      $sideExt= isset($_POST['sideExt'])?"Side ground extension: Yes":"Side ground extension: No";
      $twoStoreyRear= isset($_POST['twoStoreyRear'])?"Two-storey rear extension: Yes":"Two-storey rear extension: No";
      $twoStoreySide= isset($_POST['twoStoreySide'])?"Two-storey side extension: Yes":"Two-storey side extension: No";
      $loft= isset($_POST['loft'])?"Loft conversion: Yes":"Loft conversion: No";
      $newBuild= isset($_POST['newBuild'])?"New Build: Yes":"New Build: No";
      $flat= isset($_POST['flat'])?"Flat: Yes":"Flat: No";
      $other= isset($_POST['other'])?"Other: Yes":"Other: No";
      $message=$_POST['message'];
    // you can specify which email you want your contact form to be emailed to here
      $toemail = "[email protected]";
      $subject = "From Website Test";
      $headers = "MIME-Version: 1.0\r\n
                 From: $name <".$email.">\r\n
                 Content-type: text/html; charset=iso-8859-1";
      $body = "Name: $name\r\n
              Email: $email\r\n
              Contact No: $contact_number\r\n
              Address1: $address1\r\n
              Address2: $address2\r\n
              Town: $town\r\n
              County: $county\r\n
              Postcode: $postcode\r\n
              Property Type: $propertyType\r\n
              Property Area: $propertyArea\r\n
              Rear ground extension: $rearExt\r\n
              Side ground extension: $sideExt\r\n
              Two-storey rear extension: $twoStoreyRear\r\n
              Two-storey side extension: $twoStoreySide\r\n
              Loft conversion: $loft\r\n
              New build: $newBuild\r\n
              Flat: $flat\r\n
              Other: $other\r\n
              Message:\r\n
                $message";
      if (!ereg("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email))
        echo "That is not a valid email address.  Please return to the"
               ." previous page and try again.";
        exit;
        mail($toemail, $subject, $body, $headers);
        echo "Thanks for submitting your message";
    ?>
    </body>
    </html>

  • Data_table inspects "value" before other inputs are processed.

    Hello,
    The ordering in which JSF processes inputs and outputs in the presence of a data_table seems problematic, and I'm at a loss for a workaround.
    When a form is submitted (via a command_button, for example), the data_table accesses its "value" reference before any of the other "inputs" in the form are processed by JSF. For example:
    [snip]
    <h:input_text value="#{TestBean.testValue}"/>
    <h:data_table rows="2" value="#{TestBean.result}" var="object">
    <h:column>
    <f:facet name="header">
    <h:output_text value="Name"/>
    </f:facet>
    <h:output_text value="#{object.name}"/>
    </h:column>
    </h:data_table>
    <h:command_button action="#{TestBean.testAction}" value="Test"/>
    [snip]
    When this form is submitted, the value from input_text is set AFTER data_table calls TestBean.result. So, the ordering of method calls after submission is:
    TestBean.result
    TestBean.testValue
    TestBean.testAction
    In contrast, if a data_table is NOT used to get at TestBean.result, the ordering of the method calls is quite different:
    TestBean.testValue
    TestBean.testAction
    TestBean.result
    Is this a bug, or does data_table intentionally inspect its "value" before any of the other form inputs are processed? If so, what is the solution for ensuring TestBean gets all of the information it needs before TestBean.result is called in the data_table...? In other words, TestBean.result depends on TestBean.testValue.
    Please let me know if any other info is needed!
    Thanks,
    Ryan

    Hi Adam,
    Thanks for your reply. I guess I could use some help making the leap from Controller/View mentalities. :)
    How can a bean ever process input data if it can't depend on the data being there? Or, can you suggest a way to model the above example so that the "results" getter always knows the input from "testValue" has been set -- split it into two beans maybe?
    Or, maybe do the processing inside the "testAction" instead of "results"? Even then, wouldn't that be assuming that when "testAction" is called, "testValue" has been set.
    I'm afraid I don't understand how this can be modeled without some expectation that form values have been filled in the bean before other tasks are fired.
    Thanks,
    Ryan

  • Email a form using PHP works intermittently

    Hello all,
    I'm using DW CS6/ Win 7. I have created a simple subscription form where the user enters their email and the form is emailed to an administrator. Sometimes it works and sometimes it doesn't and I have no idea why. Occasionally I  receive the email after a delay of several minutes and sometimes it never arrives. The webpage is here www.sanbenitoolivefestival.com/contactus2.php , below is the script , I've tried in IE and FF, same intermittent results. I'm new to FF/ Firebug but it didn't report any errors that I could see
    <div class="subscribe">
        <div class="spacer"></div>
    <?php
    if ((isset($_REQUEST['email'])) && ($_REQUEST['email'] != " Enter Email Address"))
    //if "email" is filled out, send email
        echo "sending mail";
        //send email
       $email = $_REQUEST["email"] ;
       $subject = "SBOF EMAIL SUBSCRIPTION REQUEST" ;
       $message = "Please add my email address to the SBOF email subscription list" ;
       mail("[email address removed by moderator]", $subject,
       $message, "From:" . $email);
       echo "Thank you, we have sent your subscription request";
    else
    //if "email" is not filled out, display the form
       echo '<form action="contactus2.php" method="post" >
         <em>Stay in touch by joining our email list.                  
          <input name="email" type="text" value=" Enter Email Address" size="42"  class="input" />         
         <input name="submit" type="submit" value="   SUBSCRIBE  " class="button"/>
          </em>
        </form>';
    ?>
    </div>

    You are using an extremely insecure technique that lays your form wide open to a malicious attack known as email header injection, which can turn your form into a spam relay.
    You should NEVER use unfiltered form input in the email headers. The From header is intended to indicate who sent the email. In this case, it's your website, not the person who fills out the form. If you want the convenience of hitting the reply button in your email program to use the sender's email address, you should use the Reply-to header instead of From.
    Misusing the From header like this is one possible cause of your emails not getting through. You should also check with your hosting company to see if they require the fifth argument to mail() to be set. This is normally a string that begins with -f followed immediately by a known email address on the same domain as the server, for example '[email protected]'.
    Also, using $_REQUEST is insecure.
    Change your code like this:
    <?php
    if ((isset($_POST['email'])) && ($_POST['email'] != " Enter Email Address"))
    //if "email" is filled out, send email
        // make sure the email is OK
        $email = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL);
        // send the message only if the email address is valid
        if ($email) {
            echo "sending mail";
            //send email
            $from = '[email protected]';  // this should be your own email address
            $subject = "SBOF EMAIL SUBSCRIPTION REQUEST" ;
            $message = "Please add my email address to the SBOF email subscription list" ;
            $headers = "From: $from\r\nReply-to: $email";
            $sent = mail("[email address removed by moderator]", $subject,
                $message, $headers);
            if ($sent) {
                echo "Thank you, we have sent your subscription request";
           } else {
                echo 'Sorry, there was a problem sending your request';
    else
    //if "email" is not filled out, display the form
       echo '<form action="contactus2.php" method="post" >
         <em>Stay in touch by joining our email list.                 
          <input name="email" type="text" value=" Enter Email Address" size="42"  class="input" />        
         <input name="submit" type="submit" value="   SUBSCRIBE  " class="button"/>
          </em>
        </form>';
    ?>

  • HTML special characters in form input

    In my site I store form input in my database. Before I store
    the data, I parse out smart quotes, en dashes, and other extended
    special characters and convert them into HTHML quivalents such as
    &#8217;
    All is well and good until the user goes to edit their info.
    In my form these characters show up in my <input> tags as
    their long-winded HTML equivalents, such as &#8217; instead of
    a smart apostrophe.
    Is there any way to convert these back to the special
    characters from the HTML on the form input text fields so that
    users can edit them without being confused?
    Thanks.

    Hmmm, well I ran the MX 6.1 updater and installed the two hot
    fixes that had to do with null pointer exceptions and it still does
    not work.
    Here is the detailed error I'm getting, if it helps. Any more
    ideas? Thanks again for the help, I'm really stuck on this one...
    The system has attempted to use an undefined value, which
    usually indicates a programming error, either in your code or some
    system code.
    Null Pointers are another name for undefined values.
    The error occurred in C:\Inetpub\wwwroot\store\index.cfm:
    line 1
    1 : <cfquery name="getBooks" datasource="#dsn#">
    2 : SELECT *
    3 : FROM products
    Please try the following:
    * Check the ColdFusion documentation to verify that you are
    using the correct syntax.
    * Search the Knowledge Base to find a solution to your
    problem.
    Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
    rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7
    Remote Address 127.0.0.1
    Referrer
    Date/Time 09-Oct-07 02:20 PM
    Stack Trace
    at
    cfindex2ecfm1770128649.runPage(C:\Inetpub\wwwroot\store\index.cfm:1)
    java.lang.NullPointerException
    at coldfusion.sql.QueryTable.populate(QueryTable.java:260)
    at coldfusion.sql.QueryTable.populate(QueryTable.java:159)
    at coldfusion.sql.Executive.getRowSet(Executive.java:505)
    at coldfusion.sql.Executive.executeQuery(Executive.java:974)
    at coldfusion.sql.Executive.executeQuery(Executive.java:886)
    at coldfusion.sql.SqlImpl.execute(SqlImpl.java:236)
    at
    coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:447)
    at
    cfindex2ecfm1770128649.runPage(C:\Inetpub\wwwroot\store\index.cfm:1)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:147)
    at
    coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:357)
    at
    coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:62)
    at
    coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:107)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:80)
    at
    coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:24)
    at
    coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:47)
    at
    coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52)
    at
    coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
    at
    coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:35)
    at
    coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:43)
    at
    coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at coldfusion.CfmServlet.service(CfmServlet.java:105)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:249)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
    at
    jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:192)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:348)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:294)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

  • Is there a way to add/delete words from the predictive text ?

    Is there a way to add/delete words from the predictive text options that my iPhone is giving me? I'm using an iPhone 6 Plus with iOS 8.
    There are specific words that are popping up in the area right above the keyboard where it displays 3 word suggestions to choose from. This area seems to suggest words that I have typed before, I'd like to remove these words. Default seems to select the word in the center and when I'm typing fast on occasion it will recommend and select words that I don't need to use.
    Any help would be appreciated.

    999753 wrote:
    I know in 10g delete is added but in 9i i can only work with UPSERT( update, insert)
    is there a way to add delete into 9i MERGE? or somehow encapsulate it?
    Thank youI would suggest upgrading to a supported version of the database. 9i has been unsupported for many many years now.
    And to answer your question... to the best of my knowledge, there is no workaround. It works as it works.

  • AS2 contact form and php - works fine but only sends half of the text in the comments field ???

    hi all - i have an AS2 contact form using php to send the info to my email address - it all works fine except this ..... rather than having an empty comments box in the flash movie i had added a whole bunch of feedback questions that the user can comment yes/no to in the comments box (my feedback questions were added into the input text box in cs3 so are there when the user opens the contact page .. i have set the maximum characters to 10000 so no worries that its that that is stopping it all coming through in the email ..... basically when i go to my form online and send it i get it through as an email but with only three quarters of the feedback text in it ...... i have tried a zillion ways a round this, tried other contact forms and php and always end up with the same problem ... any ideas any one ?
    this is the AS....
    stop();
    a =0;
    function validate () {
        if (from.length>=7) {
            if (from.indexOf("@")>0) {
                if ((from.indexOf("@")+2)<from.lastIndexOf(".")) {
                    if (from.lastIndexOf(".")<(from.length-2)) {
                        a = 1;
                        // email is fine
    function formcheck () {
        validate ();       
        trace(a);
        if (fname = "" or telno eq "" or comments eq "" or from eq "") {
            stop();
            error = "You have left blank fields, please fill in all fields, thank you";
        } else {
            emailcheck ();
    function emailcheck (){
        if (a != 1){
            stop();
            error = "Email address not valid";
            } else {
            loadVariablesNum("mail.php3", 0, "POST");
            gotoAndStop(2);
    ..........this is the php
    <?php
    $adminaddress = "[email protected]";
    $sitename = "Flash Site Form Mailer";
    mail("$adminaddress","Info Request",
    "A customer at $sitename has made the following enquiry\n
    First Name: $name
    Company Name: $company
    Telephone: $telno
    Email: $from\n
    The visitor commented:
    $comments
    Logged Info :
    Using: $HTTP_USER_AGENT
    Hostname: $ip
    IP address: $REMOTE_ADDR
    Date/Time:  $date","FROM:$adminaddress");
    ?>
    any help much appreciated

    i think you should not use $HTTP_USER_AGENT.
    and use loadvars instead of loadvariablesnum:
    stop();
    a =0;
    function validate () {
        if (from.length>=7) {
            if (from.indexOf("@")>0) {
                if ((from.indexOf("@")+2)<from.lastIndexOf(".")) {
                    if (from.lastIndexOf(".")<(from.length-2)) {
                        a = 1;
                        // email is fine
    function formcheck () {
        validate ();       
        trace(a);
        if (fname = "" or telno eq "" or comments eq "" or from eq "") {
            stop();
            error = "You have left blank fields, please fill in all fields, thank you";
        } else {
            emailcheck ();
    var sendLV:LoadVars=new LoadVars();
    function emailcheck (){
        if (a != 1){
            stop();
            error = "Email address not valid";
            } else {
    sendLV.name=fname;
    sendLV.telno=telno;
    sendLV.company=company;  //assuming company is a variable in your flash
    sendLV.comments=comments;
    sendLV.send("mail.php3", "POST");
            gotoAndStop(2);
    //..........this is the php
    <?php
    $adminaddress = "[email protected]";
    $sitename = "Flash Site Form Mailer";
    $from=?;//you need to define this variable
    $name=$_POST['name'];
    $telno=$_POST['telno'];
    $company=$_POST['company'];
    $comments=$_POST['comments'];
    $body=
    "A customer at $sitename has made the following enquiry\n
    First Name: $name
    Company Name: $company
    Telephone: $telno
    Email: $from\n
    The visitor commented:
    $comments";
    mail($adminaddress,"Info Request",$body);
    ?>

  • Trying to add a Word Press blog to my Dreamweaver site through a linked tab... is it possible?

    Trying to add a Word Press blog to my Dreamweaver site through a linked tab... is it possible?  My client wants a blog on his website that I am curently creating in Dreamweaver and I am clueless on how to manually create one using a DB... so is it possible to use a menubar link to go to a wordpress page that would contain the blog?  Please help.
    Thanks,
    TIffany

    Be sure to install WP files inside a separate folder on the domain.  
    yourdomain.com/blog/wp
    http://codex.wordpress.org/Installing_WordPress
    Link to blog:
    <a href="http://yourdomain.com/blog/wp/index.php">Link to Blog</a>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com/

  • How do link form input and a datatable that are on the same page?

    I am real new to JSF, so I'm having the following issue...
    I created a demo app that will pull records from from a database and display them in a datatable. I hava a backingbean for this process that works great with hardcoded data.
    Now, I want to add a form to this page and use the form input to drive the results in the datatable. I have created my form and used a separate backingbean that is essentially a JavaBean for all the form input.
    My question is how do I integrate the submit button from this new form to feed the call that is used for the datatable?
    Here's is a snippet of the pertinent code from the JSP:
    <TABLE border="0">
                   <TBODY>
                        <TR>
                             <TD>
                             <P>Correlation ID:</P>
                             </TD>
                             <TD><h:inputText styleClass="inputText" id="correlationId"
                                  value="#{LogMessageBean.correlationId}"></h:inputText></TD>
                             <TD width="121"></TD>
                             <TD width="153">
                             <P>Workflow ID:</P>
                             </TD>
                             <TD width="158"><h:inputText styleClass="inputText" id="workItemId"
                                  value="#{LogMessageBean.workItemId}"></h:inputText></TD>
                        </TR>
                   </TBODY>
              </TABLE>
              <BR>
              <div align="center">
              <h:commandButton value="Search" actionListener="#{LogValueListHandler.search}" action="#{LogValueListHandler.result}"/>
              <h:commandButton value="Reset" onclick="reset()"/></div>
              <H5>Application Logging Results</H5>
              <t:dataTable value="#{LogValueListHandler.logList}" var="feed"
                   rowClasses="oddrow, evenrow" headerClass="table">
                   <t:column>
                        <f:facet name="header">
                             <h:outputText value="ClassName" />
                        </f:facet>
                        <h:outputText value="#{feed.className}" />
                   </t:column>
                   <t:column>
                        <f:facet name="header">
                             <h:outputText value="MethodName" />
                        </f:facet>
                        <h:outputText value="#{feed.methodName}" />
                   </t:column>
    ...Thanks!

    Locutus_1,
    I'm working on the same sort of app - A data table where the record selected is displayed in a form below the datatable and may be edited and saved.
    I've included a checkbox in the datatable so that the user can indicate which record is to be displayed and edited. The have everything working, except that I cannot get the checkbox click event passed to the backing bean correctly (critical to the entire operation). When I have this working, I'll post the code.
    This solution does not have a direct link between the datatable model and the data handled by the form. The backing bean code does this. If there was a solution where the two could be linked directly via JSF, I'd be very interested in it.
    Werner

  • How to make form input value a dataset value?

    Have a form and one hidden field, i want the value to come from
    a dataset.
        <input name="buyerbid" type="hidden" id="buyerbid" value="<?php  { ?> echo '<div spry:region="ds3" class="StackedContainers">
    <div spry:repeat="ds3" class="RowContainer">
    <div class="RowColumn">{column0}</div>
    </div>
    </div>' ;
    <?php } ?>" /> 
    The Spry is the
    <div spry:region="ds3" class="StackedContainers">
    <div spry:repeat="ds3" class="RowContainer">
    <div class="RowColumn">{column0}</div>
    </div>
    </div>
    Spry dataset renders correctly in a div on the page, but can't get the same value in the form input value?
    thanks for your help,
    Jim Balthrop

    thanks for your help.
    The php i knew was the wrong code.
    the spry region not surrounding the form was the answer.
    so i did it this way and it worked.
    <div spry:region="ds4"><form method="POST" name="client_bid" id="client_bid">
        <input name="vehicle_ID" type="hidden" id="vehicle_ID" value="<?php echo $row_rs_vehicle['vehicle_ID']; ?>" />
        <input name="buyer_ID" type="hidden" id="buyer_ID" value="<?php echo $row_rs_login['client_ID']; ?>" /> 
        <input name="auction_ID" type="hidden" id="auction_ID" value="<?php echo $row_rs_auction['auction_ID']; ?>" />
        <input name="buyerbid" type="hidden" id="buyerbid" value="{ds4::column0}" />
        <input name="submitbuyer" type="submit" id="submitbuyer" value="Submit Bid">
      </form></div>
    thanks again.
    -Jim Balthrop

  • Could not convert Word 2007 form

    I'm running Acrobat 11 (up to date). When I try and convert a Word 2007 form to an Acrobat form, I get the message: Acrobat could not create new PDF form"

    The Word conversion to PDF and Forms Wizard do not detect and do not know how to complete a drop down box. I do not even create the form fields in Word as there is no transfer to the PDF. I also find the Wizard lacking in proper naming and grouping. It is just easier and more efficient to add the fields manually or with JavaScript tools.
    The only product that can do this is apache OpenOffice when an author creates the from body and form fields in the Writer application and then exports to a PDF.

Maybe you are looking for