Warning: Cannot modify header information..../includes/common/KT_functions.inc.php on line 465

Hi,
I've moved a website from a server to another, and have got this little issue,
I've a form witch gets submit and the user redirects to a "thank you" page, on the submittion I've added mail send so I get an email when the form is submitted, the mail part works fine, I get the emails. but after clicking the submit button this error comes up instead of redirecting to the thank you page.
Warning:  Cannot modify header information - headers already sent by (output started at ..../index.php:79) in /...../includes/common/KT_functions.inc.php on line 465
This is the KT_functions.inc.php part,
function KT_redir($url) {
    $protocol = "http://";
    $server_name = $_SERVER["HTTP_HOST"];
    if ($server_name != '') {
        $protocol = "http://";
        if (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == "on")) {
            $protocol = "https://";
        if (preg_match("#^/#", $url)) {
            $url = $protocol.$server_name.$url;
        } else if (!preg_match("#^[a-z]+://#", $url)) {
            $script = KT_getPHP_SELF();
            if (isset($_SERVER['PATH_INFO']) && $_SERVER['PATH_INFO'] != '' && $_SERVER['PATH_INFO'] != $_SERVER['PHP_SELF']) {
                $script = substr($script, 0, strlen($script) - strlen($_SERVER['PATH_INFO']));
            $url = $protocol.$server_name.(preg_replace("#/[^/]*$#", "/", $script)).$url;
                session_write_close();
        $url = str_replace(" ","%20",$url);
        if (KT_is_ajax_request()) {
            header("Kt_location: ".$url);
            echo "Redirecting to: " . $url;
        else {
            header("Location: ".$url);
    exit;
I'm not a coder and appreciate any help.
Thanks in advance.

addField("fornamn", true, "text", "", "", "", "Vänligen skriv ditt namn"); $formValidation->addField("efternamn", true, "text", "", "", "", "Vänligen skriv efternamn"); $formValidation->addField("gatu", true, "text", "", "", "", "Vänligen skriv gatuadress"); $formValidation->addField("postnummer", true, "text", "", "", "", "Vänligen ange postnummer"); $formValidation->addField("ort", true, "text", "", "", "", "Vänligen skriv ort"); $formValidation->addField("telefon", true, "numeric", "int", "5", "", "Vänligen skriv ett giltilgt telefon nummer"); $formValidation->addField("epost", true, "text", "email", "", "", "Vänligen skriv en e-post adress. dit skickar vi status på din service"); $tNGs->prepareValidation($formValidation); // End trigger //start Trigger_SendEmail trigger //remove this line if you want to edit the code by hand function Trigger_SendEmail(&$tNG) {   $emailObj = new tNG_Email($tNG);   $emailObj->setFrom("[email protected]");   $emailObj->setTo("{epost}");   $emailObj->setCC("");   $emailObj->setBCC("[email protected]");   $emailObj->setSubject("Upplåsning: {modell} Nr: {id}");   //WriteContent method   $emailObj->setContent("Hej {fornamn},
\n");   $emailObj->setEncoding("UTF-8");   $emailObj->setFormat("HTML/Text");   $emailObj->setImportance("Normal");   return $emailObj->Execute(); } //end Trigger_SendEmail trigger if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") {   $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;   $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);   switch ($theType) {     case "text":       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";       break;        case "long":     case "int":       $theValue = ($theValue != "") ? intval($theValue) : "NULL";       break;     case "double":       $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";       break;     case "date":       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";       break;     case "defined":       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;       break;   }   return $theValue; } } $colname_phone = "-1"; if (isset($_GET['mobil_id'])) {   $colname_phone = $_GET['mobil_id']; } mysql_select_db($database_wd, $wd); $query_phone = sprintf("SELECT * FROM mobiler WHERE id = %s", GetSQLValueString($colname_phone, "int")); $phone = mysql_query($query_phone, $wd) or die(mysql_error()); $row_phone = mysql_fetch_assoc($phone); $totalRows_phone = mysql_num_rows($phone); // Make an insert transaction instance $ins_bestall = new tNG_insert($conn_wd); $tNGs->addTransaction($ins_bestall); // Register triggers $ins_bestall->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1"); $ins_bestall->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation); $ins_bestall->registerTrigger("END", "Trigger_Default_Redirect", 99, "http://domain.com/---------.html"); $ins_bestall->registerTrigger("AFTER", "Trigger_SendEmail", 98); // Add columns $ins_bestall->setTable("bestall"); $ins_bestall->addColumn("fornamn", "STRING_TYPE", "POST", "fornamn"); $ins_bestall->addColumn("deb", "STRING_TYPE", "POST", "deb", "{phone.deb}"); $ins_bestall->addColumn("efternamn", "STRING_TYPE", "POST", "efternamn"); $ins_bestall->addColumn("gatu", "STRING_TYPE", "POST", "gatu"); $ins_bestall->addColumn("postnummer", "STRING_TYPE", "POST", "postnummer"); $ins_bestall->addColumn("ort", "STRING_TYPE", "POST", "ort"); $ins_bestall->addColumn("telefon", "NUMERIC_TYPE", "POST", "telefon"); $ins_bestall->addColumn("epost", "STRING_TYPE", "POST", "epost"); $ins_bestall->addColumn("modell", "STRING_TYPE", "POST", "modell"); $ins_bestall->addColumn("imei", "STRING_TYPE", "POST", "imei"); $ins_bestall->setPrimaryKey("id", "NUMERIC_TYPE"); // Execute all the registered transactions $tNGs->executeTransactions(); // Get the transaction recordset $rsbestall = $tNGs->getRecordset("bestall"); $row_rsbestall = mysql_fetch_assoc($rsbestall); $totalRows_rsbestall = mysql_num_rows($rsbestall); ?>  displayValidationRules();?> getErrorMsg(); ?>
Modell:
Pris:
------: Kr      -----      ----- ----
Postförskott (Vi bjuder på postförskotts avgiften)       
Förnamn:
          displayFieldHint("fornamn");?> displayFieldError("bestall", "fornamn"); ?>
Efternamn:
          displayFieldHint("efternamn");?> displayFieldError("bestall", "efternamn"); ?>
Gatuadress:
          displayFieldHint("gatu");?> displayFieldError("bestall", "gatu"); ?>
Postnummer:
          displayFieldHint("postnummer");?> displayFieldError("bestall", "postnummer"); ?>
Ort:
          displayFieldHint("ort");?> displayFieldError("bestall", "ort"); ?>
Telefon:
          displayFieldError("bestall", "telefon"); ?>
E-Post:
           displayFieldError("bestall", "epost"); ?>
          displayFieldHint("modell");?> displayFieldError("bestall", "modell"); ?>
IMEI:
                displayFieldHint("imei");?> displayFieldError("bestall", "imei"); ?>         -----.
Debranding:
            Ja                        Nej
          ------           ";         }        else{           echo "Denna telefon kan ej debrandas!    Nej";         }?>         
Here is the complete code for the form page, I've replaced some textes with "-------------"

Similar Messages

  • Headers already sent (includes/common/KT_functions.inc.php on line 464)

    Hello,
    I use a dynamic list wizard with ADDT for a backoffice. On my computer,with phpmyadmin, everything is ok and seems to be functional. But as soon as I upload my folders I got this error message :
    Warning: Cannot modify header information - headers already sent by (output started at /Library/WebServer/Documents/backoffice/Connections/connec.php:1) in /Library/WebServer/Documents/backoffice/includes/common/KT_functions.inc.php on line 464
    I checked my pages and didn't notice "white spaces" before or after php markup. I always got this problem.
    Anynone could help me ?
    Thanks

    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=189&threadid =1332533

  • Warning: Cannot modify header information

    Hi,
    When I submit a form I get
    Warning: Cannot modify header information - headers already sent by (output started at /home/aiop/public_html/events/registerEventWA.php:4) in /home/aiop/public_html/includes/common/KT_functions.inc.php on line 464
    I know this usually means i have a space either before the

    I have encountered that a few times, and always figured it out, it fixed itself, or, some other standard task remedied it, unknowingly to me.
    my mantra: I'm no guru!
    but ive seen this a few times and cant remember much details.
    I'm thinking it may have came once with SSI situations. Or it may have been something with improper syntax in my connection file. Sorry that's not a LOT of help, but i'll be lookin out and if i see it again soon, and / or if i remember the cause / remedy, i'll post.
    Best,
    ben blue

  • Error says: Warning: Cannot modify header information

    I keep receiving an error message after my form is sent (the form still send the information I need just wont re-direct to the next page)
    It redirects to a page that says:
    Warning: Cannot modify header information - headers already sent by (output started at /home/tommyle/public_html/newp.php:10) in /home/tommyle/public_html/newp.php on line 41
    my php code looks like this:
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Tommy Lemonade Beta</title>
    <link href="style1.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <?php
    /* Set e-mail recipient */
    $myemail = "profiles@tommylemonade";
    /* Check all form inputs using check_input function */
    $name = check_input($_POST['name'], "Enter your name");
    $subject = check_input($_POST['subject'], "Enter a subject");
    $email = check_input($_POST['email']);
    $message = check_input($_POST['message'], "Write your message");
    /* If e-mail is not valid show error message */
    if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $email))
    show_error("E-mail address not valid");
    /* Let's prepare the message for the e-mail */
    $message = "
    Name: $name
    E-mail: $email
    Subject: $subject
    Message:
    $message
    /* Send the message using mail() function */
    mail($myemail, $subject, $message);
    /* Redirect visitor to the thank you page */
    header('Location: thanks.html');
    exit();
    /* Functions we used */
    function check_input($data, $problem='')
    $data = trim($data);
    $data = stripslashes($data);
    $data = htmlspecialchars($data);
    if ($problem && strlen($data) == 0)
    show_error($problem);
    return $data;
    function show_error($myError)
    ?>
    <html>
    <body>
    <p>Please correct the following error:</p>
    <strong><?php echo $myError; ?></strong>
    <p>Hit the back button and try again</p>
    </body>
    </html>
    <?php
    exit();
    ?>
    </body>
    </html>
    This is line 41:
    header('Location: thanks.html');
    Can anybody see what I'm missing?

    Yeah, rework the code so you don't get any output before the php code is executed (like below):
    <?php
    /* Set e-mail recipient */
    $myemail = "profiles@tommylemonade";
    /* Check all form inputs using check_input function */
    $name = check_input($_POST['name'], "Enter your name");
    $subject = check_input($_POST['subject'], "Enter a subject");
    $email = check_input($_POST['email']);
    $message = check_input($_POST['message'], "Write your message");
    /* If e-mail is not valid show error message */
    if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $email))
    show_error("E-mail address not valid");
    /* Let's prepare the message for the e-mail */
    $message = "
    Name: $name
    E-mail: $email
    Subject: $subject
    Message: $message
    /* Send the message using mail() function */
    mail($myemail, $subject, $message);
    /* Redirect visitor to the thank you page */
    header('Location: thanks.html');
    exit();
    /* Functions we used */
    function check_input($data, $problem='')
    $data = trim($data);
    $data = stripslashes($data);
    $data = htmlspecialchars($data);
    if ($problem && strlen($data) == 0)
    show_error($problem);
    return $data;
    function show_error($myError)
    ?>
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Tommy Lemonade Beta</title>
    <link href="style1.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <p>Please correct the following error:</p>
    <strong><?php echo $myError; ?></strong>
    <p>Hit the back button and try again</p>
    </body>
    </html>
    <?php
    exit();
    ?>

  • PHP login - Warning: Cannot modify header information

    I don't know much about PHP so if this is a FAQ / basic
    problem then sorry
    ... but I get this warning message on a page after logging in
    Warning: Cannot modify header information - headers already
    sent by (output
    started at /home/.sites/78/site58/web/elite/index.php:2) in
    /home/.sites/78/site58/web/elite/index.php on line 40
    Any help appreciated!
    Gerry

    Ah - I get it, a space before the code.
    G
    "G" <[email protected]> wrote in message
    news:e34m08$3kv$[email protected]..
    >I don't know much about PHP so if this is a FAQ / basic
    problem then sorry
    >... but I get this warning message on a page after
    logging in ...
    >
    >
    > Warning: Cannot modify header information - headers
    already sent by
    > (output started at
    /home/.sites/78/site58/web/elite/index.php:2) in
    > /home/.sites/78/site58/web/elite/index.php on line 40
    >
    > Any help appreciated!
    >
    > Gerry
    >

  • Cannot modify header information

    As a newby on databases. I am trying to forward a visitor to
    another page after completing their details on an insert record...
    But whatever I do I keep getting this error:
    Warning: Cannot modify header information - headers already
    sent by (output started at
    /content/StartupHostPlus/r/e/relishlunch.com/web/SignMeUp.php:1) in
    /content/StartupHostPlus/r/e/relishlunch.com/web/SignMeUp.php on
    line 52
    If I take out the redirection in the script it works ok but
    of course I don't get the redirection...
    Any ideas?

    colinwalton wrote:
    > As a newby on databases. I am trying to forward a
    visitor to another page after
    > completing their details on an insert record...
    >
    > But whatever I do I keep getting this error:
    > Warning: Cannot modify header information - headers
    already sent by (output
    > started at
    /content/StartupHostPlus/r/e/relishlunch.com/web/SignMeUp.php:1) in
    >
    /content/StartupHostPlus/r/e/relishlunch.com/web/SignMeUp.php on
    line 52
    "Headers already sent" is one of the most common errors that
    beginners
    run into. The header() function cannot perform the redirect
    if any
    output has been sent to the browser. This includes new lines
    or any
    whitespace outside the PHP tags.
    According to the error message, output was started at line 1
    of
    SignMeUp.php. Make sure there is nothing before the opening
    PHP tag.
    Also make sure there's no whitespace outside the PHP tags in
    RelishConnection.php.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Cannot Modify Header Information Errors

    Hello all,
    I am working on building an members only area to my website, and have used the "turorial" provided in dreamweaver help.  After creating the pages though I am encountering erros which I believe have to do with the redirecting.
    On my registration page (www.hondovfd.org/newsite/register.php) I am getting the error:
    Warning:  Cannot modify header information - headers already sent in /var/home/hondovfd/hondovfd.org/www/newsite/register.php on line 50
    The registration goes through, as I can see it in my database, but the error prevents anything further.
    On my login page (www.hondovfd.org/newsite/login.php) I immediatly get these two errors when loading the page:
    Warning:  session_start() [function.session-start]: Cannot send session cookie - headers already sent in /var/home/hondovfd/hondovfd.org/www/newsite/login.php on line 1074249146
    Warning:  session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/home/hondovfd/hondovfd.org/www/newsite/login.php:1074249146) in /var/home/hondovfd/hondovfd.org/www/newsite/login.php on line 1074249146
    And once I enter a valid username/password this error is also added:
    Warning: Cannot modify header information - headers already sent by (output started at /var/home/hondovfd/hondovfd.org/www/newsite/login.php:1074249146) in /var/home/hondovfd/hondovfd.org/www/newsite/login.php on line 68
    If you would like to try and diagnose the username/password I have been using is"test" for both fields.
    Anyone have any ideas why this is occuring?
    Thanks,
    David

    Here is the code from my login page:
    <?php virtual('/newsite/Connections/hondovfd.php');?>
    <?php if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    ?>
    <?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
      session_start();
    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
      $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    if (isset($_POST['username'])) {
      $loginUsername=$_POST['username'];
      $password=$_POST['password'];
      $MM_fldUserAuthorization = "";
      $MM_redirectLoginSuccess = "/newsite/membersonly.php";
      $MM_redirectLoginFailed = "/newsite/loginfailed.html";
      $MM_redirecttoReferrer = true;
      mysql_select_db($database_hondovfd, $hondovfd);
      $LoginRS__query=sprintf("SELECT username, password FROM login WHERE username=%s AND password=%s",
        GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
      $LoginRS = mysql_query($LoginRS__query, $hondovfd) or die(mysql_error());
      $loginFoundUser = mysql_num_rows($LoginRS);
      if ($loginFoundUser) {
         $loginStrGroup = "";
        //declare two session variables and assign them
        $_SESSION['MM_Username'] = $loginUsername;
        $_SESSION['MM_UserGroup'] = $loginStrGroup;          
        if (isset($_SESSION['PrevUrl']) && true) {
          $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];     
        header("Location: " . $MM_redirectLoginSuccess );
      else {
        header("Location: ". $MM_redirectLoginFailed );
    ?>
    <!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"><!-- InstanceBegin template="/Templates/template.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <!-- InstanceBeginEditable name="Title" -->
    <title>Login</title>
    <!-- InstanceEndEditable -->
    <meta name="description" content="Hondo Fire and Rescue serves the Arroyo Hondo and Canada Village areas of Santa Fe County, NM." />
    <meta name="keywords" content="hondo, hondo fire, hondo vfd, hondo fire department, santa fe county fire department, santa fe county, volunteer fire department, hondo volunteer fire department" />
    <link href="/newsite/stylesheet.css" type="text/css" rel="stylesheet" />
    <!--[if IE]>
    <style type="text/css">
    #mainContent, #sidebar1 { zoom: 1;}
    </style>
    <![endif]-->
    <script src="/newsite/SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="/newsite/SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
    </head>
    <body class="thrColLiqHdr">
    <div id="container">
    <div id="header"></div>
      <div id="sidebar1">
      <h3>Navigation : </h3>
      <ul id="MenuBar1" class="MenuBarVertical">
      <li><a href="/newsite/index.html">Home</a></li>
    <li><a href="/newsite/support.html">Support Hondo</a></li>
      <li><a class="MenuBarItemSubmenu" href="#">Information Menu</a>
        <ul>
          <li><a href="/newsite/people.html">Our People</a></li>
          <li><a href="http://www.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=101620713606637979698.00045b6ead4ab4ea70b78&z=11" target="_blank">Response Area</a></li>
          <li><a href="/newsite/medical.html">Medical</a></li>
          <li><a href="/newsite/apparatus.html">Apparatus</a></li>
          <li><a href="/newsite/training.html">Training</a></li>
          <li><a href="/newsite/volunteer.html">Volunteer</a></li>
          <li><a href="/newsite/statistics.html">Statistics</a></li>
          <li><a href="/newsite/patchtrading.html">Patch Trading</a></li>
        </ul>
      </li>
      <li><a href="#">Photo Gallery</a></li>
      <li><a href="/newsite/calendar.html">Calendar</a></li>
      <li><a href="/newsite/news.html">Blog/News</a></li>
      <li><a href="/newsite/links.html">Links</a></li>
      <li><a href="/newsite/contact.html">Contact Us</a></li>
    </ul>
    <br />
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
      <span class="lefttext">
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="hosted_button_id" value="8567201">
    <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" />
    <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
    </img></input></input>
      </span>
    </form>
    <span class="lefttext"><br />
    </span>
    <center>
      <span class="lefttext"><a href="http://www.facebook.com/pages/Santa-Fe-NM/Hondo-Volunteer-Fire-Department/74284233488" target="_blank" class="lefttext">Hondo VFD on Facebook</a></span>
    </center>
      <!-- end #sidebar1 --></div>
      <div id="sidebar2"> 
        <p>Call Statistics for November</p>
      <table width="90%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="60%">EMS Calls</td>
        <td width="40%">##</td>
      </tr>
      <tr>
        <td>Fire Calls</td>
        <td>##</td>
      </tr>
      <tr>
        <td>Other Calls</td>
        <td>##</td>
      </tr>
    </table>
      <hr />
        <div id="cse" style="width:100%;">Loading</div>
    <script src="http://www.google.com/jsapi" type="text/javascript"></script>
    <script type="text/javascript">
      google.load('search', '1');
      google.setOnLoadCallback(function(){
        new google.search.CustomSearchControl().draw('cse');
      }, true);
    </script>
         <!-- End Google Search Element -->
      </div>
      <!-- end #sidebar2 -->
      <div id="mainContent">
      <div class="top"></div><div class="wrap"><!-- InstanceBeginEditable name="Main Content" -->
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="47" class="h2">Members Only Login</td>
      </tr>
      <tr>
        <td><form id="login" name="login" method="POST" action="<?php echo $loginFormAction; ?>">
        <table width="40%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="31%">Username:</td>
        <td width="69%"><input name="username" type="text" /></td>
      </tr>
      <tr>
        <td>Password</td>
        <td><input name="password" type="password" /></td>
      </tr>
    </table>
    <input name="Submit" type="submit" />
        </form></td>
      </tr>
    </table>
      <!-- InstanceEndEditable -->
    </div>
    <div class="bottom"></div>
    </div>
         <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --> <br class="clearfloat" />
      <div id="footer">
        <p align="center">&copy; Copyright 2009 Hondo Volunteer Fire Department | <a href="mailto:[email protected]">Contact Us</a><a href="http://www.legalhelpers.com/chapter-13-bankruptcy/chapter13.html"></a><br />Hosting provided by <a href="http://studiox.com/" target="_blank">Studio X</a></p>
      <!-- end #footer --></div>
    <!-- end #container --></div>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    <!-- InstanceEnd --></html>
    Here is the code from my registration page:
    <?php virtual('/newsite/Connections/hondovfd.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    // *** Redirect if username exists
    $MM_flag="MM_insert";
    if (isset($_POST[$MM_flag])) {
      $MM_dupKeyRedirect="/newsite/registerinvalidusername.html";
      $loginUsername = $_POST['username'];
      $LoginRS__query = sprintf("SELECT username FROM login WHERE username=%s", GetSQLValueString($loginUsername, "text"));
      mysql_select_db($database_hondovfd, $hondovfd);
      $LoginRS=mysql_query($LoginRS__query, $hondovfd) or die(mysql_error());
      $loginFoundUser = mysql_num_rows($LoginRS);
      //if there is a row in the database, the username was found - can not add the requested username
      if($loginFoundUser){
        $MM_qsChar = "?";
        //append the username to the redirect page
        if (substr_count($MM_dupKeyRedirect,"?") >=1) $MM_qsChar = "&";
        $MM_dupKeyRedirect = $MM_dupKeyRedirect . $MM_qsChar ."requsername=".$loginUsername;
        header ("Location: $MM_dupKeyRedirect");
        exit;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO login (username, password, email, name) VALUES (%s, %s, %s, %s)",
                           GetSQLValueString($_POST['username'], "text"),
                           GetSQLValueString($_POST['password'], "text"),
                           GetSQLValueString($_POST['email'], "text"),
                           GetSQLValueString($_POST['name'], "text"));
      mysql_select_db($database_hondovfd, $hondovfd);
      $Result1 = mysql_query($insertSQL, $hondovfd) or die(mysql_error());
      $insertGoTo = "/newsite/registersuccess.html";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO login (username, password, email, name) VALUES (%s, %s, %s, %s)",
                           GetSQLValueString($_POST['username'], "text"),
                           GetSQLValueString($_POST['password'], "text"),
                           GetSQLValueString($_POST['email'], "text"),
                           GetSQLValueString($_POST['name'], "text"));
      mysql_select_db($database_hondovfd, $hondovfd);
      $Result1 = mysql_query($insertSQL, $hondovfd) or die(mysql_error());
      $insertGoTo = "/newsite/registersuccess.html";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location:", $insertGoTo));
    ?>
    <!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"><!-- InstanceBegin template="/Templates/template.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <!-- InstanceBeginEditable name="Title" -->
    <title>Register</title>
    <!-- InstanceEndEditable -->
    <meta name="description" content="Hondo Fire and Rescue serves the Arroyo Hondo and Canada Village areas of Santa Fe County, NM." />
    <meta name="keywords" content="hondo, hondo fire, hondo vfd, hondo fire department, santa fe county fire department, santa fe county, volunteer fire department, hondo volunteer fire department" />
    <link href="stylesheet.css" type="text/css" rel="stylesheet" />
    <!--[if IE]>
    <style type="text/css">
    #mainContent, #sidebar1 { zoom: 1;}
    </style>
    <![endif]-->
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
    </head>
    <body class="thrColLiqHdr">
    <div id="container">
    <div id="header"></div>
      <div id="sidebar1">
      <h3>Navigation : </h3>
      <ul id="MenuBar1" class="MenuBarVertical">
      <li><a href="/newsite/index.html">Home</a></li>
    <li><a href="/newsite/support.html">Support Hondo</a></li>
      <li><a class="MenuBarItemSubmenu" href="#">Information Menu</a>
        <ul>
          <li><a href="/newsite/people.html">Our People</a></li>
          <li><a href="http://www.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=101620713606637979698.00045b6ead4ab4ea70b78&z=11" target="_blank">Response Area</a></li>
          <li><a href="/newsite/medical.html">Medical</a></li>
          <li><a href="/newsite/apparatus.html">Apparatus</a></li>
          <li><a href="/newsite/training.html">Training</a></li>
          <li><a href="/newsite/volunteer.html">Volunteer</a></li>
          <li><a href="/newsite/statistics.html">Statistics</a></li>
          <li><a href="/newsite/patchtrading.html">Patch Trading</a></li>
        </ul>
      </li>
      <li><a href="#">Photo Gallery</a></li>
      <li><a href="/newsite/calendar.html">Calendar</a></li>
      <li><a href="/newsite/news.html">Blog/News</a></li>
      <li><a href="/newsite/links.html">Links</a></li>
      <li><a href="/newsite/contact.html">Contact Us</a></li>
    </ul>
    <br />
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
      <span class="lefttext">
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="hosted_button_id" value="8567201">
    <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" />
    <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
    </img></input></input>
      </span>
    </form>
    <span class="lefttext"><br />
    </span>
    <center>
      <span class="lefttext"><a href="http://www.facebook.com/pages/Santa-Fe-NM/Hondo-Volunteer-Fire-Department/74284233488" target="_blank" class="lefttext">Hondo VFD on Facebook</a></span>
    </center>
      <!-- end #sidebar1 --></div>
      <div id="sidebar2"> 
        <p>Call Statistics for November</p>
      <table width="90%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="60%">EMS Calls</td>
        <td width="40%">##</td>
      </tr>
      <tr>
        <td>Fire Calls</td>
        <td>##</td>
      </tr>
      <tr>
        <td>Other Calls</td>
        <td>##</td>
      </tr>
    </table>
      <hr />
        <div id="cse" style="width:100%;">Loading</div>
    <script src="http://www.google.com/jsapi" type="text/javascript"></script>
    <script type="text/javascript">
      google.load('search', '1');
      google.setOnLoadCallback(function(){
        new google.search.CustomSearchControl().draw('cse');
      }, true);
    </script>
         <!-- End Google Search Element -->
      </div>
      <!-- end #sidebar2 -->
      <div id="mainContent">
      <div class="top"></div><div class="wrap"><!-- InstanceBeginEditable name="Main Content" -->
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="47" class="h2">Create an Account</td>
      </tr>
      <tr>
        <td><p>Please fill in the following information to create an account:</p>
        <form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
          <table width="53%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="38%">Name</td>
        <td width="62%"><input name="name" type="text" /></td>
      </tr>
      <tr>
        <td>E-Mail Address</td>
        <td><input name="email" type="text" /></td>
      </tr>
      <tr>
        <td>Desired Username</td>
        <td><input name="username" type="text" /></td>
      </tr>
      <tr>
        <td>Desired Password</td>
        <td><input name="password" type="password" /></td>
      </tr>
    </table><input name="submit" type="submit" />
    <input type="hidden" name="MM_insert" value="form1" />
    </p></form></td>
      </tr>
    </table>
      <!-- InstanceEndEditable -->
    </div>
    <div class="bottom"></div>
    </div>
         <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --> <br class="clearfloat" />
      <div id="footer">
        <p align="center">&copy; Copyright 2009 Hondo Volunteer Fire Department | <a href="mailto:[email protected]">Contact Us</a><a href="http://www.legalhelpers.com/chapter-13-bankruptcy/chapter13.html"></a><br />Hosting provided by <a href="http://studiox.com/" target="_blank">Studio X</a></p>
      <!-- end #footer --></div>
    <!-- end #container --></div>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    <!-- InstanceEnd --></html>
    Dreamweaver also created this file:  hondovfd.php
    <?php
    # FileName="Connection_php_mysql.htm"
    # Type="MYSQL"
    # HTTP="true"
    $hostname_hondovfd = "localhost";
    $database_hondovfd = "hondovfd_org";
    $username_hondovfd = "silver";
    $password_hondovfd = "m3d1c4u2c";
    $hondovfd = mysql_pconnect($hostname_hondovfd, $username_hondovfd, $password_hondovfd) or trigger_error(mysql_error(),E_USER_ERROR);
    ?>

  • Login failure (cannot modify header) PHP/MySQL

    I have a login form 100% Dreamweaver8 built using PHP/MySQL.
    After logging in it fails to goto the $MM_redirectLoginSuccess page
    (index.php). I did not have this issue prior to the 8.02 update. I
    designed it the same way as I had before the 8.02 update. I have
    checked multiple times for whitespace before and after the PHP open
    and close tags in Dreamweaver and other text editors.
    Below is what info is needed I hope.
    Error
    PHP Warning: Cannot modify header information - headers
    already sent by (output started at /var/www/web4/web/login.php:4)
    in /var/www/web4/web/login.php on line 72, referer:
    Code (All Dreamweaver 8 Generated)
    <?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
    session_start();
    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
    $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    if (isset($_POST['username'])) {
    $loginUsername=$_POST['username'];
    $password=$_POST['password'];
    $MM_fldUserAuthorization = "Account_Type";
    $MM_redirectLoginSuccess = "index.php";
    $MM_redirectLoginFailed = "loginfailed.php";
    $MM_redirecttoReferrer = false;
    mysql_select_db($database_dnsturtle, $dnsturtle);
    $LoginRS__query=sprintf("SELECT Email, Password,
    Account_Type FROM accounts WHERE Email=%s AND Password=%s",
    GetSQLValueString($loginUsername, "text"),
    GetSQLValueString($password, "text"));
    $LoginRS = mysql_query($LoginRS__query, $dnsturtle) or
    die(mysql_error());
    $loginFoundUser = mysql_num_rows($LoginRS);
    if ($loginFoundUser) {
    $loginStrGroup = mysql_result($LoginRS,0,'Account_Type');
    //declare two session variables and assign them
    $_SESSION['MM_Username'] = $loginUsername;
    $_SESSION['MM_UserGroup'] = $loginStrGroup;
    if (isset($_SESSION['PrevUrl']) && false) {
    $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
    header("Location: " . $MM_redirectLoginSuccess );
    --------------------Line 72
    else {
    header("Location: ". $MM_redirectLoginFailed );
    ?>

    I take it you have an include file as well on the page, to
    reference the
    database? Check in there for whitespace.
    Gareth
    http://www.phploginsuite.co.uk/
    PHP Login Suite V2 - 34 Server Behaviors to build a complete
    Login system.

  • Header Information Including a Max(FieldN) and then Pulling the field(Date) When Max Occurred

    Post Author: Skyeyes
    CA Forum: General
    Can anyone assist us as we have several columns we are displaying. One column called FieldN we gather the MAX from the column and want to place the Max(FieldN) in the header--this works.  Also next to FieldN where it is MAX we want to pull the field(Date) that MAX happened.  When we do the formula, it pulls the first date in the list, not of the MAX.
    MAX(FieldN)  & (Date)
    Any ideas would be helpful.  Thanks.

    Post Author: yangster
    CA Forum: General
    Give this a trystringvar fieldNDate := totext(FieldN)&totext(DATE);stringvar maxDate := nthlargest(1, fieldNDate);stringvar Datedisplay := right(maxDate, 6);so essentially you are trying to find the max date associated with the max fieldNthe nthlargest will find you the largest fieldN and its associated date since there could be multiple dates associated with the max fieldN fieldthe last string is just to strip the field and display only the datethis should work out you might have to tinker with the right to get your formatting.

  • Cannot modify purchase order

    Hello experts,
    Do you have any idea about the following issue:
    In SAP 2007, I cannot modify any information in the purchase order (contents tab) even
    if the order is still open. And if I copy this order to a Goods Receipt PO, I  cannot also change the items' information in the goods receipt. In addition, the icons "target document" and "base document " are grayed out.
    Thank you.
    Nadia.

    Hi Nadia,
    "I cannot modify any information in the purchase order (contents tab) even if the order is still open" maybe the PO was created through approval steps? If yes, that's the reason it can't be amended
    Best Regards,
    Hendry Wijaya

  • CatalogDeployer issue - "Cannot set header. Response already committed"

    Whenever we are trying to deploy any package we immediately get a 'deployment successful' message though the package is not deployed and remnains in the received for deployment queue. This is only found in the log 00000048 SRTServletRes W WARNING: Cannot set header. Response already committed.
    Very much appreciated if you could provide the resolution.
    We have a production service release tomorrow so we need assistance on this one asap. Thanks a lot

    You can not write to the response after you have forwarded the request to another servlet/JSP.

  • TS1702 I have installed a new version of an APP (mViewer).   This app allows me to view security cameras in my office when I'm away.  I've tried istalling it several times, put in all the information, including passwords and cannot get it to work.?

    I have installed a new version of an APP (mViewer).  This app allows me to view security cameras in my office from anywhere.  I've tried installing several times, put in all the information, including passwords, but cannot get it to work either on my iPhone or iPad. Is anyone familiar with this app?  Thank you.

    I don't know this app, but I did look it up in the iTunes Store, thinking I would suggest you could visit the developer's (vendor's) site and seek assistance there.
    But when I found the app and went to the vendor's site, I found garbage (nothing useful).
    Oh well.

  • I keep getting a message "safari cannot open page [page name with header information] because you are not connected to the internet.

    I keep getting a message "safari cannot open page [page name with header information] because you are not connected to the internet.  Then I check CNN for a time stamp, and I am connected to the internet.  I have reset everything suggested in other posts, ensured any other device that could be hogging bandwidth is off, the router is reset, the iPad is reset.  The other devices are not having this problem, and it happens on both places I use the iPad, the university library, (getting a second degree after a change in a long time career and at home. Any insight into this issue would be appreciated.

    Saing yu tried everthing provides little information to us.  We do not know what you tied.
    Have you tried:
    - Resetting the iPod:
    Reset iPod touch:  Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    - Powering off and then back on your router- Resetting network setting: Settings>General>Reset>Reset Network Settings
    The toubleshooting here:
    iPhone and iPod touch: Troubleshooting Wi-Fi networks and connections
    - Does you iPod conenct to other networks?
    - Do other devices connect to your network?

  • How can I include the Header Information....for a File to IDOC Scenario

    Hi,
    I made a File to IDOC Scenario with DEBMDM06 for MDM>XI>SAP R/3. The Header Information in the XML File which is at the XI end is Missing. For that reason In Tcode SXMB_MONI we are getting an Error that <b>"HEADER Information Missing: Message should Start with EDI_DC40"</b> i.e the Header Information.
      My Question is that whether we can do some changes in the Message mapping Step in the Integration Repository. I HardCoded the Few mandatory Fields that were there but it Again gave me the Same Error as above.
    Can you please Suggest some Solution for this. Since the data is Coming in from MDM part the Header information is not there but It actually Important as it has got all the Port Information.
      Kindly Inform me some Solutions.
    Thanks & Regards
    Somnath

    Hi Suraj,
      Thanks for ur Reply, but Since we are Doing a File to IDOC Scenario the IDOC DEBMDM is on the Right Side in Message Mapping and as U know it is Mandatory to Map an IDOC on the Right Part. EDI_DC40 is coming as it is there in the IDOC but our XML File Does not have that. If we Don't Map then it Becomes RED, which is an Error.
      Furthermore in the Receiver Agreement we have put the Necessary Details such as Sender Service and Receiver Service along with the IDOC Communication Channels.
      Can U give as a Better Insight on this Note how to check the Header Part as it is mandatory to MAP.We also tried to HARDCODE it by putting those Values and Mapping them to a Constant but it is Giving the Same Error.
    Thanks and Regards
    Somnath

  • Cannot find any information on property  in a bean of type mypackage??

    Hi
    I got an error org.apache.jasper.JasperException: Cannot find any information on property in a bean of type mypackage. I tried to find the solution and found that I need to use the naming convention so I fixed it. But I still got that error. Please help me.
    Here's my Jsp file.
    <%@ taglib prefix="fm" uri="/WEB-INF/matcher.tld"%>
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <jsp:useBean id="obj" scope="session" class="com.webIndex.match.Matcher"/>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <link href="wixIndex.css" rel="stylesheet" type="text/css">
            <title>Web Index</title>
        </head>
         <body>
              <%@ include file="header.html" %>
                 <jsp:setProperty name="obj" property="*" /> 
             <h4>WIX files for your search
                  "<jsp:getProperty name="obj" property="keyword"/>"
             </h4>     
             <h4>  and  
                  "<jsp:getProperty name="obj" property="kwinfo"/>":
             </h4>     
             <br>
              ${fm:Matcher(obj, obj.keyword, obj.kwinfo)}
         </body>
    </html>And here's my first java program.
    public class Matcher {
         public static String match(FindMatch object,
                String keyword, String kwinfo) {
            return object.exact_match(keyword, kwinfo);
             //return keyword;
    }And here's my second Java program.
    public class FindMatch {
         private String keyword;
         private String kwinfo;
         static String refile;
         public FindMatch() {
            keyword = "";
            kwinfo = "";
         public String getKeyword() {
            return keyword;
         public void setKeyword(String keyword) {
            this.keyword = keyword;
         public String getKwinfo(){
              return kwinfo;
         public void setKwinfo(String kwinfo){
              this.kwinfo = kwinfo;
        public String exact_match(String keyword, String kwinfo)  {
        //     do something here
         return refile.toString();
      }And here's my tld:
    <?xml version="1.0" encoding="UTF-8" ?>
    <taglib xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd"
        version="2.0">
        <tlib-version>1.0</tlib-version>
        <short-name>fm</short-name>
        <uri>http://com.webIndex.match.Matcher.tld</uri>
        <function>
            <name>Matcher</name>
            <function-class>
                com.webIndex.match.Matcher
            </function-class>
            <function-signature>
                java.lang.String match(
                    com.webIndex.match.FindMatch,
                    java.lang.String, java.lang.String)
            </function-signature>
        </function>
    </taglib>Thanks!!

    Ok, I 've changed the name of useBean id to 'matcher' and replace every 'obj' with 'matcher'
    But I still got the error.
    And so when I tried to do what you said. I got this error.
    org.apache.jasper.JasperException: An exception occurred processing JSP page /search_result.jsp at line 27
    24:           
    25:           <jsp:setProperty name="matcher" property="*" />
    26:
    27:           <h4>WIX files for your search ${matcher.keyword}</h4>
    28:           <h4>and ${matcher.kwinfo}</h4>
    And actually, my exact_match is not just like that. But I thought that the problem is not concerned with my problem and it's just concerned with jsp, so i skipped it. Here's the actual progam., i mean exact_match() and I skipped other parts coz it said that my post exceeds maximum allowed words.
    package com.webIndex.match;
    public class FindMatch {
         private String keyword;
         private String kwinfo;
         static String refile;
         public FindMatch() {
         public String getKeyword() {
            return keyword;
         public void setKeyword(String keyword) {
            this.keyword = keyword;
         public String getKwinfo(){
              return kwinfo;
         public void setKwinfo(String kwinfo){
              this.kwinfo = kwinfo;
           public String exact_match(String keyword, String kwinfo)  {
        //     String loctest="";
         //     loctest = getClass().getResourceAsStream("/resources/wixIndex.xml").toString();
             String fname ="";
             String allentries="";
             keyword = upperCase(keyword);                
                  try{
                       //String location = directory.getCanonicalPath();
                       //File indexfile = new File(xmlLocation + "wixIndex.xml");
                       //ServletContext application = getServletConfig().getServletContext();
                       //InputStream indexfile = getClass().getResourceAsStream("/resources/wixIndex.xml");
                       //InputStream namefile = getClass().getResourceAsStream("/resources/indexList.xml");
                       File indexfile = new File ("D:\\Documents and Settings\\May\\workspace\\WixFinder\\WebContent\\WEB-INF\\classes\\resources\\wixIndex.xml");
                      File namefile = new File ("D:\\Documents and Settings\\May\\workspace\\WixFinder\\WebContent\\WEB-INF\\classes\\resources\\indexList.xml");
                          DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
                       domFactory.setNamespaceAware(true);
                       DocumentBuilder builder = domFactory.newDocumentBuilder();
                       Document doc = builder.parse(indexfile);
                       XPathFactory factory = XPathFactory.newInstance();
                       XPath xpath = factory.newXPath();
                       XPathExpression expr = xpath.compile("//entry//index[keyword='"+keyword+"']" +
                                 "//file[not(preceding::file[parent::index[keyword='"+keyword+"']] = .)]");
                       xpath.compile("//file//entry[page='"+input+"']" +
                            "//color[not(preceding::color[parent::entry[page='"+input+"']] = .)]");
                       Object result = expr.evaluate(doc, XPathConstants.NODESET);
                       NodeList nodes = (NodeList) result;
                       refile="";
                       //InputStream namefile = getClass().getResourceAsStream("/resources/indexList.xml");
                       for (int i = 0; i < nodes.getLength(); i++) {
                            fname = nodes.item(i).getTextContent();
                            doc = builder.parse(namefile);
                            expr = xpath.compile("//wixfile//index[file='"+fname+"']//name//text()");
                            result = expr.evaluate(doc, XPathConstants.NODESET);
                            NodeList nodefile = (NodeList)result;                  
                            //showing the file name <desc - name> tag
                            for (int j=0; j< nodefile.getLength(); j++){
                                 refile = refile + "<br>" ;
                                 refile = refile + nodefile.item(j).getTextContent();
                            //call method to show link
                            String linktodoc = showLink(fname, keyword);
                            //String prvalue = getPageRank(linktodoc);
                            //int rankvalue = Integer.parseInt(prvalue);
                            //PageRankService pgrank = new PageRankService();
                            //int rankvalue = pgrank.getPR(linktodoc);
                            if (rankvalue != -1){
                                 refile = refile + "<br>" + "<a href='" + linktodoc + "'>" + linktodoc + "</a>" +
                                      "<br>[Pagerank -" + rankvalue + "]";
                            else{
                                 refile = refile + "<br>" + "<a href='" + linktodoc + "'>" + linktodoc + "</a>" +
                                 "<br>[Pagerank -" + prvalue + "]";
                            //refile = refile + "<br>" + "<a href='" + linktodoc + "'>" + linktodoc + "</a>";
                            refile = refile + "<br>" + linktodoc;
                            allentries = showentries(fname);
                            refile = refile  +  "Some other keywords from same wix file:" + "<br>" + allentries;
                            //refile = refile + "<input type='"submit"' value='"BOOKMARK!!"' class='"button"'/>"
                            String attach = "<table>" + "<tr bgcolor='#FFCCFF'>" + "<td>" +
                                 "<a STYLE='" + "text-decoration:none'" +
                                      "href='" + "attach.jsp" + "'>" +
                                 "<strong>" + "Attach This" + "</strong>" + "</a>" +
                                 "</td>" + "</tr>" + "</table>";
                            refile = refile + "<br>" + attach;
                  }catch(Exception e){return e.toString();}
             if (refile != ""){
                  refile = refile.substring(4, refile.length());
                 return refile.toString();
             else
                  return "<h4>No such exact match!</h4>";
    }And actually, my program totally worked fines when I pass only 'keyword' and the error occurs after I add 'kwinfo' to it.
    Thanks.

Maybe you are looking for

  • Adobe Photoshop CS5 do not recognize my scanners

    I have 3 Canon scanners. They are all reconised by Photoshop CS4 extended. Now I bought and installed also Photoshop CS5 Extended. None of those scanners are recognised by CS5. So I have to scann with CS4, save the picture and then openwith CS5. I ha

  • Expanding Tree nodes

    is it possible to expand tree node on rollover instead of clicking on the triangle?

  • Control bar in ID4 won't show character & paragraph settings

    Just switched from ID2 to ID4 and in the old Indesign I always had character styling in the control bar top of the window - font,font size and so on. I can't get it to show up in the control bar in ID4. Here's a screen shot of the "customize control

  • Itunes crashes when i try to put my ipod on "disk use"

    hi... i have a problem!... hahaha, i have and ipod 5.5g itunes is uptodate and the ipod drivers as well... my ipod syncs just fine, the music and the videos, but not the fotos, and when i try to put "enable disk use" it let me but when i hit apply it

  • Org. value sync job in ERM

    Hello experts, Scenario: Our backend system consist HR component, but we do not use it and therefore do not want to implement the HR RTA So my question is, Is it possible to skip the HR contents for the org. value sync job in ERM? As we encounter err