Update page title

Hi,
I create a form that allows user to change the HTML page title. It works, but after the form is submitted with the new page title, the title does not change immediately. The user has to refresh the page or go to another page to see the changed title. Is there a way to completely refresh the page on form submit and immediately show the results (ie new title) to the user?

Eleeist wrote:
I have finally got to the root of the problem - the sequence in which code is executed.
I have fixed this and now everything works just fine. Thanks everyone for help .
Great. I'll just append what I ended up with, just in case it contains something you might want to use.
<cfif isDefined("form.submit")>
          <cfset websiteTitle = form.websiteTitle>
<cfelse>
          <cfset websiteTitle = "no_title">
</cfif>
<!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"/>
          <link rel="stylesheet" type="text/css" href="/styles/stylesheet.css"/>
          <title>
                    <cfoutput>#websiteTitle#</cfoutput>
          </title>
</head>
<body>
<cfform>
          <cfinput type="text" name="websiteTitle" required="yes" message="Supply the title">
          <cfinput type="submit" name="submit">
</cfform>
</body>

Similar Messages

  • Problem with an update page.

    I have a problem with an update page on my website
    Here's how it work
    values are defualted in from the advert table  - this works fine
    I should then be able to change the fields and click on the update button
    This works fine but ONLY when the O_year field is populated. 
    There doesn't seem to be anything special about the O_year field
    I thought spry text validation would of been causing the issues, but I removed them and have the same problem.
    For some reason the POST_MMupdate value is not being set to 'form4', which it is doing if O_year is set.
    Please can someone have a look at this, code,
    Also, is there a way of 'stepping through' dreamweaver code to debug it?
    Thanks
    Adam
    $colname_Advert = "-1";
    if (isset($_GET['advert_id'])) {
      $colname_Advert = $_GET['advert_id'];
    mysql_select_db($database_guitarswap_db, $guitarswap_db);
    $query_Advert = sprintf("SELECT * FROM advert WHERE advert_id = %s", GetSQLValueString($colname_Advert, "int"));
    $Advert = mysql_query($query_Advert, $guitarswap_db) or die(mysql_error());
    $row_Advert = mysql_fetch_assoc($Advert);
    $totalRows_Advert = mysql_num_rows($Advert);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form4"))
        //Сheck that we have a file
    if((!empty($_FILES["PictureLocation"])) && ($_FILES['PictureLocation']['error'] == 0))
          //Check if the file is JPEG image and it's size is less than 350Kb
          $filename = basename($_FILES["PictureLocation"]["name"]);
          $ext = substr($filename, strrpos($filename, '.') + 1);
          if (($ext == "jpg") && ($_FILES["PictureLocation"]["type"] == "image/jpeg") &&
        ($_FILES["PictureLocation"]["size"] < 350000))
            //Determine the path to which we want to save this file
              $newname = dirname(__FILE__).'/upload/'.$filename;
              //Check if the file with the same name is already exists on the server
              if (!file_exists($newname))
                //Attempt to move the uploaded file to it's new place
                if ((move_uploaded_file($_FILES['PictureLocation']['tmp_name'],$newname)))
                       // echo "It's done! The file has been saved as: ".$newname;
                else
                       // echo "Error: A problem occurred during file upload!";
            else
                 // echo "Error: File ".$_FILES["PictureLocation"]["name"]." already exists";
          else
             // echo "Error: Only .jpg images under 350Kb are accepted for upload";
        else
         // echo "Error: No file uploaded";
        $filename=$row_Advert['PictureLocation'];
        // set default opentoalloffers
    if (!isset($_POST['checkopentoalloffers']))
        $_POST['checkopentoalloffers'] = 'n';
      $updateSQL = sprintf("UPDATE advert SET PictureLocation=%s, O_Make=%s, O_Model=%s, O_Country=%s, O_Year=%s, O_Colour=%s, O_Body=%s, O_Neck=%s, O_Fingerboard=%s, O_Pickups=%s, `value`=%s, `condition`=%s,  W_Make=%s, W_Model=%s, W_Country=%s, W_Year=%s, W_Colour=%s, W_Body=%s, W_Neck=%s, W_Fingerboard=%s, W_Pickups=%s, Comments=%s, opentoalloffers=%s, ChangeFlg = %s  WHERE advert_id=%s",
                           GetSQLValueString($filename, "text"),
                           GetSQLValueString($_POST['O_Make'], "text"),
                           GetSQLValueString($_POST['O_Model'], "text"),
                           GetSQLValueString($_POST['O_Country'], "text"),
                           GetSQLValueString($_POST['O_Year'], "date"),
                           GetSQLValueString($_POST['O_Colour'], "text"),
                           GetSQLValueString($_POST['O_Body'], "text"),
                           GetSQLValueString($_POST['O_Neck'], "text"),
                           GetSQLValueString($_POST['O_Fingerboard'], "text"),
                           GetSQLValueString($_POST['O_Pickups'], "text"),
                           GetSQLValueString($_POST['value'], "int"),
                           GetSQLValueString($_POST['condition'], "text"),
                           GetSQLValueString($_POST['W_Make'], "text"),
                           GetSQLValueString($_POST['W_Model'], "text"),
                           GetSQLValueString($_POST['W_Country'], "text"),
                           GetSQLValueString($_POST['W_Year'], "date"),
                           GetSQLValueString($_POST['W_Colour'], "text"),
                           GetSQLValueString($_POST['W_Body'], "text"),
                           GetSQLValueString($_POST['W_Neck'], "text"),
                           GetSQLValueString($_POST['W_Fingerboard'], "text"),
                           GetSQLValueString($_POST['W_Pickups'], "text"),
                           GetSQLValueString($_POST['Comments'], "text"),
                           GetSQLValueString($_POST['checkopentoalloffers'], "text"),
                           GetSQLValueString('y', "text"),
                           GetSQLValueString($_POST['advert_id'], "int"));
      mysql_select_db($database_guitarswap_db, $guitarswap_db);
      $Result1 = mysql_query($updateSQL, $guitarswap_db) or die(mysql_error());
        $updateGoTo = "Member2.php";
         if (isset($_SERVER['QUERY_STRING'])) {
           $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
           $updateGoTo .= $_SERVER['QUERY_STRING'];
         header(sprintf("Location: %s", $updateGoTo));
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <link href="Layout3.css" rel="stylesheet" type="text/css" /><!--[if IE 5]>
    <style type="text/css">
    /* place css box model fixes for IE 5* in this conditional comment */
    .twoColFixLtHdr #sidebar1 { width: 230px; }
    </style>
    <![endif]--><!--[if IE]>
    <style type="text/css">
    /* place css fixes for all versions of IE in this conditional comment */
    .twoColFixLtHdr #sidebar1 { padding-top: 30px; }
    .twoColFixLtHdr #mainContent { zoom: 1; }
    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
    </style>
    <![endif]-->
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    body {
        background-color: #FFF;
        margin-left: 20px;
    .twoColFixLtHdr #container #main3 #form1 div fieldset {
        border: thin ridge #CCC;
    -->
    </style>
    <script type="text/javascript">
    <!--
    function MM_goToURL() { //v3.0
      var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
      for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
    //-->
    </script>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    </head>
    <body class="twoColFixLtHdr">
    <div id="container">
      <div id="header">
        <div id="Righty">
          <ul id="MenuBar2" class="MenuBarHorizontal">
        <li><a href="index.php">Search</a>      </li>
        <li><a href="Member2.php">Members</a></li>
      </ul>
      <p> </p>
    </div>
    <span id="LoginDiv">
        <?php
          if (isset($_SESSION['MM_Username']))
            echo "hello ". $_SESSION['MM_Username']. "";
            echo " <a href='Logout.php'>Log out</a> ";
        else
            echo "
                <a href='Login.php'>Login</a> / <a href='Register.php'>Register</a>
        ?>
        </a></span>
    <div id="Middle">
      <h1 align="center">GuitarSwap</h1>
    </div>
      </div>
      <div id="sidebar1">
        <h4>Members Area</h4>
        <ul id="MenuBar1" class="MenuBarVertical">
          <li><a href="Member2.php">My Adverts</a></li>
          <li><a href="NewAdvert.php">Create new Advert</a></li>
          <li><a href="UpdateUserDets.php">My Account</a></li>
        </ul>
        <h3>  </h3>
      </div>
      <div id="mainContent">
        <h4>Update Advert</h4>
        <!-- end #mainContent -->
      </div>
      <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
      <div id="main3">
        <div id="main">
          <fieldset>
            <legend>Please update advert details and confirm</legend>
            <form action="<?php echo $editFormAction; ?>" enctype="multipart/form-data" method="post" name="form4" id="form4">
              <input type="hidden" name="advert_id" value="<?php echo $row_Advert['advert_id']; ?>" />
              <p></p>
              <table width="650" align="center">
                <tr valign="baseline">
                  <td width="17" rowspan="15" valign="middle" nowrap="nowrap"><?php echo "<img src='upload/" .$row_Advert['PictureLocation']."' width='64' height='180'/>" ?></td>
                  <td width="133" align="right" nowrap="nowrap"> </td>
                  <td width="240" align="center" bgcolor="#CCCCCC"><strong>Offered</strong></td>
                  <td width="240" align="center" bgcolor="#CCCCCC"><strong>Wanted</strong></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Make:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Make" type="text" value="<?php echo $row_Advert['O_Make']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Make" type="text" value="<?php echo $row_Advert['W_Make']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Model:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Model" type="text" value="<?php echo $row_Advert['O_Model']; ?>" size="30" maxlength="30" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Model" type="text" value="<?php echo $row_Advert['W_Model']; ?>" size="30" maxlength="30" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Country:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Country" type="text" value="<?php echo $row_Advert['O_Country']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Country" type="text" value="<?php echo $row_Advert['W_Country']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Year:</strong></td>
                  <td bgcolor="#CCFFCC"><span id="sprytextfield1">
                  <input name="O_Year" type="text" value="<?php echo $row_Advert['O_Year']; ?>" size="4" maxlength="4" />
    <span class="textfieldInvalidFormatMsg">Invalid format.</span><span class="textfieldMinValueMsg">The entered value is less than the minimum required.</span><span class="textfieldMaxValueMsg">The entered value is greater than the maximum allowed.</span></span></td>
                  <td bgcolor="#CCFFFF"><span id="sprytextfield2">
                  <input name="W_Year" type="text" value="<?php echo $row_Advert['W_Year']; ?>" size="4" maxlength="4" />
    <span class="textfieldInvalidFormatMsg">Invalid format.</span><span class="textfieldMinValueMsg">The entered value is less than the minimum required.</span><span class="textfieldMaxValueMsg">The entered value is greater than the maximum allowed.</span></span></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Colour:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Colour" type="text" value="<?php echo $row_Advert['O_Colour']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Colour" type="text" value="<?php echo $row_Advert['W_Colour']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Body:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Body" type="text" value="<?php echo $row_Advert['O_Body']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Body" type="text" value="<?php echo $row_Advert['W_Body']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Neck:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Neck" type="text" value="<?php echo $row_Advert['O_Neck']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Neck" type="text" value="<?php echo $row_Advert['W_Neck']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Fingerboard:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Fingerboard" type="text" value="<?php echo $row_Advert['O_Fingerboard']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Fingerboard" type="text" value="<?php echo $row_Advert['W_Fingerboard']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Pickups:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Pickups" type="text" value="<?php echo $row_Advert['O_Pickups']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Pickups" type="text" value="<?php echo $row_Advert['W_Pickups']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Condition:</strong></td>
                  <td bgcolor="#CCFFCC"><label for="condition">
                    <select name="condition" size="1" id="condition">
                      <option selected="selected" value="" <?php if (!(strcmp("", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>---select---</option>
                      <option value="immaculate" <?php if (!(strcmp("immaculate", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>immaculate</option>
                      <option value="excellent" <?php if (!(strcmp("excellent", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>excellent</option>
                      <option value="good" <?php if (!(strcmp("good", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>good</option>
                      <option value="well used" <?php if (!(strcmp("well used", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>well used</option>
                      <option value="poor" <?php if (!(strcmp("poor", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>poor</option>
                  </select>
                  </label></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Value:</strong></td>
                  <td bgcolor="#CCFFCC"><span id="sprytextfield3">
                  <input name="value" type="text" value="<?php echo $row_Advert['value']; ?>" size="11" maxlength="11" />
    <span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
                <tr valign="baseline">
                  <td align="right" valign="top" nowrap="nowrap"><strong>Comments:</strong></td>
                  <td bgcolor="#CCFFCC"><textarea name="Comments" cols="25" rows="3"><?php echo $row_Advert['Comments']; ?></textarea></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Picture location</strong></td>
                  <td bgcolor="#CCFFCC"><label for="checkopentoalloffers"></label>                <input type="file" name="PictureLocation" value="<?php echo $row_Advert['PictureLocation']; ?>" size="20" /></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
                <tr valign="baseline">
                  <td height="26" align="right" nowrap="nowrap"><strong>Open to all offers:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="checkopentoalloffers" type="checkbox" id="checkopentoalloffers" value="y" <?php if (!(strcmp($row_Advert['opentoalloffers'],"y"))) {echo "checked=\"checked\"";} ?> /></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
              </table>
              <p> </p>
              <div id="submitdiv">
                <input type="hidden" name="MM_update" value="form4" />
                <input name="submit button" type="submit" id="submit button" value="Update Advert" />
              </div>
              <div id="exitdiv">
                <label for="button15"></label>
                <input name="button" type="button" id="button15" onclick="MM_goToURL('parent','Member2.php');return document.MM_returnValue" value="Exit" />
                <label for="button16"></label>
              </div>
              <p> </p>
            </form>
          </fieldset>
          <script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "integer", {validateOn:["blur"], minValue:1900, maxValue:2010, isRequired:false});
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "integer", {validateOn:["blur"], minValue:1900, maxValue:2010});
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "integer", {minValue:1900, maxValue:2010, validateOn:["blur"], isRequired:false});
    var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "currency", {validateOn:["blur"], isRequired:false});
          </script>
          <br class="clearfloat" />
      <!-- end #container -->
    </div></div></div>
    <script type="text/javascript">
    <!--
    var  = new Spry.Widget.MenuBar("", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    </html>
    <?php
    mysql_free_result($Advert);
    if (is_resource($Result1)) mysql_free_result($Result1);
    ?>

    Please note,
    Removing I investigated spry a little more, in the end I settled for removing spry altogether,
    Maybe it was because the text field in a $GET (for the default) AND a $PUT (for the update)

  • How to create an update page

    i want to create an update page using dreamweaver and record set, i succeded but it only updates the database with user id of 1. even if i login as another user with id of 3, it keeps updating the user with id of 1.please help me, a lost. below is my code:
    <?php require_once('Connections/conn_login.php'); ?>
    <?php
    if (!isset($_SESSION)) {
      session_start();
    $MM_authorizedUsers = "";
    $MM_donotCheckaccess = "true";
    // *** Restrict Access To Page: Grant or deny access to this page
    function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
      // For security, start by assuming the visitor is NOT authorized.
      $isValid = False;
      // When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
      // Therefore, we know that a user is NOT logged in if that Session variable is blank.
      if (!empty($UserName)) {
        // Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
        // Parse the strings into arrays.
        $arrUsers = Explode(",", $strUsers);
        $arrGroups = Explode(",", $strGroups);
        if (in_array($UserName, $arrUsers)) {
          $isValid = true;
        // Or, you may restrict access to only certain users based on their username.
        if (in_array($UserGroup, $arrGroups)) {
          $isValid = true;
        if (($strUsers == "") && true) {
          $isValid = true;
      return $isValid;
    $MM_restrictGoTo = "login.php";
    if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {  
      $MM_qsChar = "?";
      $MM_referrer = $_SERVER['PHP_SELF'];
      if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
      if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0)
      $MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
      $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
      header("Location: ". $MM_restrictGoTo);
      exit;
    ?>
    <?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;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
      $updateSQL = sprintf("UPDATE login SET username=%s, pwd=%s, `role`=%s, firstname=%s, lastname=%s, country=%s WHERE userID=%s",
                           GetSQLValueString($_POST['email'], "text"),
                           GetSQLValueString($_POST['pwd'], "text"),
                           GetSQLValueString($_POST['role'], "text"),
                           GetSQLValueString($_POST['firstname'], "int"),
                           GetSQLValueString($_POST['lastname'], "int"),
                           GetSQLValueString($_POST['country'], "int"),
                           GetSQLValueString($_POST['id1'], "int"));
      mysql_select_db($database_conn_login, $conn_login);
      $Result1 = mysql_query($updateSQL, $conn_login) or die(mysql_error());
      $updateGoTo = "index.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $updateGoTo));
    $colname_Recordset1 = "-1";
    if (isset($_GET['userID'])) {
      $colname_Recordset1 = $_GET['userID'];
      $_SESSION['userID'] = $_GET['userID'];
    $colname_Recordset1 = "-1";
    if (isset($_GET[''])) {
      $colname_Recordset1 = $_GET[''];
    mysql_select_db($database_conn_login, $conn_login);
    $query_Recordset1 = sprintf("SELECT userID, username, pwd, `role`, firstname, lastname FROM login WHERE userID = %s", GetSQLValueString($colname_Recordset1, "int"));
    $Recordset1 = mysql_query($query_Recordset1, $conn_login) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Scuba2u</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <?php include('headerScuba2u.php'); ?>
    <div id="main">
        <div id="left">
          <h1>Registration Form</h1>
          <fieldset>
            <legend>Register for our website</legend>
            <form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
              <p>
                <label for="firstname">First Name</label>
                <input name="firstname" type="text" id="firstname" size="30" maxlength="40" />
              </p>
              <p>Last Name
                <label for="lastname"></label>
                <input name="lastname" type="text" id="lastname" size="30" maxlength="40" />
              </p>
              <p>Country
                <input name="country" type="text" id="country" size="30" maxlength="30" />
              </p>
              <p>Email
                <label for="email"></label>
                <input name="email" type="text" id="email" size="60" maxlength="60" />
              </p>
              <p>Password
                <label for="pwd"></label>
                <input name="pwd" type="password" id="pwd" size="10" maxlength="10" />
              </p>
              <p>
                <input name="role" type="hidden" id="role" value="guest" />
                <input name="id1" type="hidden" id="id1" value="<?php echo $row_Recordset1['userID']; ?>" />
                <input type="submit" name="submit" id="submit" value="Register" />
              </p>
              <input type="hidden" name="MM_update" value="form1" />
            </form>
          </fieldset>
        </div>
    </div>
    <?php include('footerScuba2u.php'); ?>
    </body>
    </html>
    <?php
    mysql_free_result($Recordset1);
    ?>

    Temporarily change your id1 field from a hidden field to a text field so you can see if it is being set correctly for the logged in user.

  • Feature request:  auto-complete by typing Page Title (not only URL)

    I'm switching from Firefox to Safari.
    I really miss new Firefox auto URL complete feature.
    Please add it in the future updates.
    I can start typing a word in address line, and a drop-list of URLs appears with URLs AND Page titles.
    Example of a desired behavior.
    Lets say I've visited a week ago an article-page titled "World History" located here http://www.hyperhistory.com/onlinen2/Historyn2/a.html
    Now week later I dont remember the URL, i want to start typing "world history" and a drop list appears of URLs with Page Titles that contain this in a page title (but not necessarily in URL).
    Also if I would type "history" , i want URL "www.hyperhistory.com" to appear in results because it is part of an URL (doesnt matter if its the second word, it should be there.
    Example of a drop list is here http://img100.imageshack.us/my.php?image=picture2df8.jpg
    Please let me know if that is possible with current Safari 3.2.1.

    As far as I am aware it's not possible for Safari to do that.
    We're just fellow users like yourself here, so it's unlikely your (good) request will be seen unfortunately. Send feedback to Apple via the Safari menu > Report Bugs to Apple... and/or http://www.apple.com/feedback/macosx.html

  • My simple form page isn't passing along the form variable I need to load my update page?

    I have created a recordset on my update page that specifies a form variable filter that matches the form ID on my simple form page.  When I enter the information on that page and submit, I go to the update page but nothing is loaded.  I've tested the update page using a URL parameter and it loads perfectly.  Why isn't my form variable working?

    Thanks for responding.  Here's the code.  I can't help with the url since I'm running on MAMP.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <link href="assets/Trigger.css" rel="stylesheet" type="text/css" />
    </head>
    <body bgcolor="#FEFABA">
    <div id="wrapper">
    <table width="680" border="0">
      <tr bgcolor="#FEFABA">
        <td><img src="assets/images/featuredActivities/featuredActivity_logo.png" width="620" height="82" alt="Logo" /></td>
      </tr>
      <tr>
        <td height="98"><p>Update your information</p>
        <p>Please enter you Email Address and the click the Submit button</p></td>
      </tr>
      <tr>
        <td><form id="ml_email" name="ml_email" method="post" action="mailList_update.php">
          <label>
            <input name="text" type="ml_email" />
          </label>
          <label>
            <input type="submit" name="submit" id="submit" value="Submit" />
          </label>
        </form></td>
      </tr>
    </table>
    </div>
    <!--
    //-->
    </body>
    </html>

  • Dreamweaver 8 template update pages problem

    Does anyone have any ideas on this?
    I just upgraded to Dreamweaver 8 and am getting very
    frustrated with it so far. When I change a template and allow it to
    update the pages using that template, it automatically inserts the
    following code on each page which shows up then as TEXT on the page
    and I have to go and manually delete it on every page using the
    template.
    <!-- function MM_swapImgRestore() { //v3.0 var
    i,x,a=document.MM_sr;
    for(i=0;a&&i<a.length&&(x=a
    )&&x.oSrc;i++) x.src=x.oSrc; } function
    MM_preloadImages() { //v3.0 var d=document; if(d.images){
    if(!d.MM_p) d.MM_p=new Array(); var
    i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
    i<a.length; i++) if (a.indexOf("#")!=0){ d.MM_p[j]=new
    Image; d.MM_p[j++].src=a
    ;}} } function MM_swapImage() { //v3.0 var
    i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
    for(i=0;i<(a.length-2);i+=3) if
    ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
    x.oSrc=x.src; x.src=a[i+2];} } function
    MM_jumpMenu(targ,selObj,restore){ //v3.0
    eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
    if (restore) selObj.selectedIndex=0; } //-->

    Can we see the rest of the page?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "DeTuinman1970" <[email protected]> wrote in
    message
    news:[email protected]...
    > Here is my template html. That code is in the template
    and the pages are
    > all
    > fine. However, when I change anything on the template
    page, and update the
    > pages using this template, what I listed in my first
    post shows as actual
    > text
    > on each of my pages (the template itself after updating
    looks totally fine
    > with
    > no code as text, only the updated pages all have the
    code as text.
    > It won't let me post the entire code of the template, so
    I'm just putting
    > the
    > beginning part on.
    > I never had this problem with Dreamweaver 4 so I don't
    know why this is
    > happening!
    >
    > <html>
    > <head>
    > <!-- #BeginEditable "doctitle" -->
    > <title>web template</title>
    > <!-- #EndEditable -->
    > <LINK REL=STYLESHEET TYPE="text/css"
    HREF="../style.css">
    > <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    > <script language="JavaScript">
    > <!--
    > function MM_swapImgRestore() { //v3.0
    > var i,x,a=document.MM_sr;
    for(i=0;a&&i<a.length&&(x=a
    )&&x.oSrc;i++)
    > x.src=x.oSrc;
    > }
    >
    > function MM_preloadImages() { //v3.0
    > var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new
    Array();
    > var i,j=d.MM_p.length,a=MM_preloadImages.arguments;
    for(i=0;
    > i<a.length;
    > i++)
    > if (a.indexOf("#")!=0){ d.MM_p[j]=new Image;
    > d.MM_p[j++].src=a
    > }
    >
    > function MM_swapImage() { //v3.0
    > var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new
    Array;
    > for(i=0;i<(a.length-2);i+=3)
    > if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x;
    if(!x.oSrc)
    > x.oSrc=x.src; x.src=a[i+2];}
    > }
    >
    > function MM_jumpMenu(targ,selObj,restore){ //v3.0
    >
    eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
    > if (restore) selObj.selectedIndex=0;
    > }
    >
    > function MM_findObj(n, d) { //v4.01
    > var p,i,x; if(!d) d=document;
    >
    if((p=n.indexOf("?"))>0&&parent.frames.length) {
    > d=parent.frames[n.substring(p+1)].document;
    n=n.substring(0,p);}
    > if(!(x=d[n])&&d.all) x=d.all[n]; for
    (i=0;!x&&i<d.forms.length;i++)
    > x=d.forms
    [n];
    >
    for(i=0;!x&&d.layers&&i<d.layers.length;i++)
    > x=MM_findObj(n,d.layers.document);
    > if(!x && d.getElementById)
    x=d.getElementById(n); return x;
    > }
    > //-->
    > </script>
    > </head>
    >
    >

  • Iweb would not update the title

    My iweb would not update the title of one of my website pages. All other updates went through but this one. I even deleted the page and did it again and it refuses to appear right after published. It also shows an error 404 in the page when published. Can anyone help? Thanks

    Try clearing your browser's cache (Command+Option+E for Safari) and relaoding that one page.
    OT

  • Page Title showing up as 'home' in google

    Hello,
    In the metadatafield: 'Page title' I called the page 'beeldbewerking', but in Google Search the
    Page Title is showing up as 'home'.
    What's going wrong?
    Anyone???
    Han

    If you publish your site to the web, then google crawls your page, then you update your page(say, changing your page title), google will show the info they gathered the last time they crawled your page.
    You can wait a few days for google to crawl your page again, or you can try requesting a new crawl:
    http://support.google.com/webmasters/bin/answer.py?hl=en&answer=1352276

  • Lost prompt to update pages that use template..

    Yes I know I should not use templates but I do on very small sites with under 10 pages. When making adjustments to the templates I used to get a prompt asking me if I want to update pages that use that template, but I no longer get that. I must have changed something but I am wondering how I can change it back. I can manually update but I always forget and I do not wantto go that route....anyone know how I can get that prompt back to update pages that use template? Thanks much!

    Well you have suggested SSI's before instead Murray....
    No, I've suggested SSI's instead of Library items, or a combination of SSI's and a template instead of nested templates, but I've never suggested using SSI's instead of templates, although it is a workable solution.
    I dont think it matters what I have in the code. It used to prompt me whenever I changed ANYTHING and had to save.
    I do.  However, try this simple test -
    1.  Create a new, blank HTML file.
    2.  Save it with FILE | Save as Template... (verify that the page is saved in the "Templates" folder)
    3.  Spawn a new child page from this template with FILE | New > Page from Template.
    4.  Save this page with any name you prefer.
    5.  Return to the template page and change the title from Untitled document to "Whatever".  Save it.  Are you prompted?  You should be.
    If you are not prompted then there is something systemically wrong with your DW installation.

  • How to force my Wiki Page Title to get the same value as the wiki page Name

    I am working on an enterprise wiki site collection, and currently each wiki Page will have two properties that seems confusing; Name & Title.
    While the default edit form allow to edit the Wiki Page Name only , it does not provide a way to edit the Title.
    So my question is about how I can update the Wiki Page title to be always equal to the Wiki Page name that the user enters?
    For example when I first create a wiki page I miss-spell the word “Bookmark”, so I wrote the following for the wiki page name:-
    Add Bokkmarks Within a Wiki Page.
    Then I edit the page and I change the name to have a correct spelling, so currently I got the following , where the title is still having the wrong spelling:-
    So that why I am want to find a way to always update the page title to be equal to the page name? can anyone advice on this please?
    Thanks

    Hi
    You can add custom event handlers for doing the same
    The details can be referred in the links
    http://www.c-sharpcorner.com/uploadfile/Chandresh.P/implementing-event-handler-in-sharepoint/
    http://blogs.msdn.com/b/brianwilson/archive/2007/03/05/part-1-event-handlers-everything-you-need-to-know-about-microsoft-office-sharepoint-portal-server-moss-event-handlers.aspx
    Thanks
    Girish
    so is there an option in sharepoint that allow me to set the value of a site column to be equal to another value ,, without having to write code ?

  • Change SSRS "Displayed Page Title" to other than "Home - Report Manager" in top left corner of Browser

    Hi,
    I'm trying to figure how to change the actual page title that is displayed in the top left corner of the Browser
    "Home - Report Manager" to something more meaningful to my company, so that when a user bookmark the page it will pickup the title from there.
    According to the default Link:  /Reports/Pages/Folder.aspx?ViewMode=List    I opened up
    Folder.aspx, and all I see is a reference to Folder.aspx.cs,  I could not locate this file and I'm not sure if there is where I can change the title.  
    I can change the Site Title by clicking on the "Site Setting" link but this does not allow the change of the Page Title that is on the top left corner of the browser.
    Thanks for your help in advance.

    Hi Chillette,
    In Reporting Services 2008 R2 or later, if we add a bookmark for a folder or report on report manager, the title of the site will display as folder name-Report Manger or report name-Report Manager. In Reporting Services 2008 or earlier, it will display as
    Report-Manager only. We can rename the title of the site manually after we add the bookmark.
    So in your scenario, you can update the report server to SQL Server Reporting Services 2008 R2 or rename the title of the site manually after we add the bookmark.
    If you have any questions, please feel free to ask.
    Regards,
    Charlie Liao
    Charlie Liao
    TechNet Community Support

  • Page title on Discussion lists

    Hello,
    I'm trying to update "Subject" field on a discussion list with a workflow and because of this I have set the Subject field to hidden since its not required for the user to fill in.
    This works great. and my workflow also updates the subject.
    However if I look a little closer I notice that the "Page Title" is not updated if the Subject isn't filled in when creating a new discussion.
    So. To test this I have simply removed the requiremnt of the subject column and created 2 discussions:
    1. Here I have filled in "Subject" field when discussion was created (like normally) and all looks good:
    2. Here I have have not filled in Subject field when the discussion was created - However I did fill in something when editing the discussion afterwards (just like my workflow would I guess)
    So.. Do anyone have any idea if this is a simple bug or any suggestions to a workaround?
    Thank you very much for your time.

    Hi  Jan,
    According to your description, I can reproduce your scenario.Here are my actions in my workflow :
    1.  Add Extract Substring of String from Index with Length action :
    Copy from Current Item: Body (Return field as: Plain Text), starting at  0  for 32  Characters (Output to Variable: substring)
    2.  Add Set Field in Current Item  action:
    then  Set Subject  to Variable: substring (Return field as: Plain Text)
    The  issue is caused by  delayed Workflow.  When a user  create a discussion , the discussion item is created firstly , the subject column is
    set to “no title“ , the page title also is set to “no title” and meanwhile the workflow is starting, then the workflow set the subject column to a value you want. But the page tile is not  changed after created. So the  Page title would be “no title”.
    For a workaround, you can create an event  receiver   using ItemAdding method
    for your discussion board.
    For more information, you can refer to these articles:
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfieldmultilinetext.getfieldvalueastext.aspx
    http://msdn.microsoft.com/en-us/library/gg749858(v=office.14).aspx
    Thanks,
    Eric
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
    contact [email protected]
    Eric Tao
    TechNet Community Support

  • Personal customisation of page title using liquid

    Hello all,
    I am looking to customise the title of the webpage so that the top of the browser window will be personalised based on a parameter passed through the url.
    I am trying this:
            {% for listing in MDListings.items %}
            {% if {{globals.get.MID}} == {{listing.itemid}} %}
            {% assign pagetitle = {{listing.name}} %}
            {% endif %}{% endfor %}
            <title>{{pagetitle}}</title>
    When I insert it into the <head> portion and update the page, the whole chunk will move to the body automatically.
    When I run the liquid script in the body the output is fine.
    So my question is, how do i change the page title using liquid? Or is there another way to do so if liquid is not needed/recommended?
    Would someone enlighten me about this? Thanks!!

    Hi Liam,
    What I'm trying to do is to display a webapp on a custom page NOT using the module_webapps detail layout. This is because I need to produce results from 2 different categories and I'm using a connector webapp to link the categories to the webapp listing.
            {module_webapps id="" render="collection" collection="MDListings" template="" filter="all"}         {module_webapps id="" render="collection" collection="MDCategories" template="" filter="all"}         {module_webapps id="" render="collection" collection="MDConnectors" template="" filter="all"}         {% for listing in MDListings.items %}                {% if globals.get.MID == listing.itemid %}                   {% assign pagetitle = listing.name %}                                     {% endif %}         {% endfor %}        OR         {module_webapps id="" render="collection" collection="MDListings" template="" filter="all"}         {module_webapps id="" render="collection" collection="MDCategories" template="" filter="all"}         {module_webapps id="" render="collection" collection="MDConnectors" template="" filter="all"}         {% for listing in MDListings.items %}                {% if globals.get.MID == listing.itemid %}                   {% assign pagetitle = listing.name %}                  {% endif %}         {% endfor %}          
    So this content here is inside the html file that I have which I am going to use as the custom page for displaying the listing. I'm extracting the ID through the URL, then searching through the webapp list for the specific item, then extracting the information from that item.
    I can extract those information easily, however I want to make use of the name of that item and modify the page title which will change the browser page name. However when i do it in the above method, the browser will display {{listing.name}} in the first method and {{pagetitle}} in the second.
    I'm wondering if i am doing this correctly, or is there an easier way to do whatever I'm doing?

  • Adding Page Titles and Descriptions

    Hey Folks,
    How do I create an editable field in a template so that I can add <Title> and meta descriptions to individual pages?  Many Thanks for the help, I'm not the most skilled coder!
    john

    Yes and no, be very careful.
    - Using that will add head and body html to your page content even if you use a template. Check out the html. Not good.
    - If you add a description, remove it and add it again or edit it you get empty description tags inserted into the head above the current description meta.
    - If you/client has used the Old interface meta stuff then use that it will add to your meta not change it.
    - Page Title for pages, products etc is not synced with that inline on a page/product name/web app name and so changing that will either double up again or not update the title depending on what your in be it a page or product.
    ^ That is just a few of the more obvious issues with that.
    So keep that in mind

  • Value in a EIT segment(From Update Page)not getting passed to the Next Page

    Hi
    We have a extended CO to populate an EIT field as per the calculation in CO, on a custom button click.
    Calculated value is stored/displayed in the EIT Update Page.
    On clicking Apply, value is not getting passed to the next page, EIT Main Page and further to store the calcualted value in the EIT table.
    Anyone have faced such problem ?
    Thanks
    Arun

    Hi Gaurav
    Facing problems with put/getSessionValue.
    For the first time in a session, we do not have any issues.
    For next transaction in the same session,
    Variable has the same value even if we go for a next EIT transaction, and replaces this value for the field, without pressing the custom button.
    Thanks
    Arun

Maybe you are looking for