Skip to main content
Known Participant
April 9, 2012
Question

Firefox fails to display form content from mysql

  • April 9, 2012
  • 2 replies
  • 2599 views

Firefox 11 is failing to display text from a mysql dbase.  Within the form there are various text boxes and text areas that function correctly, but one text area that remains inert. No content from the dbase and will not display flashing curser. It functions OK in IE8.  I can see no reason for this.  Can you?

The code of the whole code is quoted below. I have enboldened the relevant miscreant line.

:

  <td colspan="2" rowspan="10"><form name="form1" method="POST" action="<?php echo $editFormAction; ?>">

      <table width="100%"  border="0" cellspacing="0" cellpadding="2">

        <tr>

          <td width="20%" class="right_cell">**Name of Organisation or Service:</td>

          <td colspan="4"><input name="cel_org" type="text" id="cel_org" onBlur="MM_validateForm('textfield','','R','textarea','','R');return document.MM_returnValue" value="<?php echo $row_rstUpEntry['cel_org']; ?>" size="60" maxlength="60">

      Town

        <input name="ck_town" type="text" id="ck_town" value="<?php echo $row_rstSix['ck_town']; ?>" size="20" maxlength="20"></td>

        </tr>

        <tr>

          <td class="right_cell">Telephone Number: </td>

          <td colspan="4"><input name="cel_tel" type="text" id="cel_tel" value="<?php echo $row_rstUpEntry['cel_tel']; ?>" size="30"></td>

        </tr>

        <tr>

          <td class="right_cell">Fax Number : </td>

          <td colspan="4"><input name="cel_fax" type="text" id="cel_fax" value="<?php echo $row_rstUpEntry['cel_fax']; ?>"></td>

        </tr>

        <tr>

          <td class="right_cell">Helpline Number :</td>

          <td colspan="4"><input name="cel_hlp" type="text" id="cel_hlp" value="<?php echo $row_rstUpEntry['cel_hlp']; ?>"></td>

        </tr>

        <tr>

          <td class="right_cell">Email address: </td>

          <td colspan="4"><input name="cel_email" type="text" id="cel_email" value="<?php echo $row_rstUpEntry['cel_email']; ?>" size="40"></td>

        </tr>

        <tr>

          <td class="right_cell">Website address:<br>

      Please use format www.etc.....</td>

          <td colspan="4"><input name="cel_web" type="text" id="cel_web" value="<?php echo $row_rstUpEntry['cel_web']; ?>" size="75" maxlength="100"></td>

        </tr>

        <tr>

          <td class="right_cell"><p>Address of Organisation:<br>

        (on single line) </p></td>

          <td colspan="4"><input name="cel_add" type="text" id="cel_add" value="<?php echo $row_rstUpEntry['cel_add']; ?>" size="75" maxlength="100"></td>

        </tr>

        <tr>

          <td class="right_cell"><p>**Description of your service:<br>

          </p></td>

          <td colspan="4" class="top_cell"><textarea name="cel_blb" cols="75" rows="8" id="cel_blb"><?php echo $row_rstUpEntry['cel_blb']; ?></textarea></td>

        </tr>

        <tr>

          <td class="right_cell">Message for email if there are handouts: </td>

          <td colspan="4" class="top_cell"><input name="cel_hndts" type="text" id="cel_hndts" value="<?php echo $row_rstUpEntry['cel_hndts']; ?>" size="100" maxlength="200"></td>

        </tr>

        <tr>

          <td class="right_cell"><h3>Contact Details</h3></td>

          <td colspan="4" class="top_cell"> </td>

        </tr>

        <tr>

          <td class="right_cell">Manager:</td>

          <td colspan="4" class="top_cell"><input name="ck_manager" type="text" id="ck_manager" value="<?php echo $row_rstSix['ck_manager']; ?>" size="35"></td>

        </tr>

        <tr>

          <td class="right_cell">Contact's Full name:</td>

          <td colspan="4" class="top_cell"><input name="ck_contact" type="text" id="ck_contact" value="<?php echo $row_rstSix['ck_contact']; ?>" size="35"></td>

        </tr>

        <tr>

          <td class="right_cell">First name:</td>

          <td colspan="4" class="top_cell"><input name="ck_firstname" type="text" id="ck_firstname" value="<?php echo $row_rstSix['ck_firstname']; ?>" size="35"></td>

        </tr>

        <tr>

          <td class="right_cell">Last name: </td>

          <td colspan="4" class="top_cell">

            <input name="ck_lastname" type="text" id="ck_lastname" value="<?php echo $row_rstSix['ck_lastname']; ?>" size="35">

          </td>

        </tr>

        <tr>

          <td class="right_cell">Contact's position:</td>

          <td colspan="4" class="top_cell"><input name="ck_position" type="text" id="ck_position" value="<?php echo $row_rstSix['ck_position']; ?>" size="35"></td>

        </tr>

        <tr>

          <td height="24" class="right_cell">Contact's tel:</td>

          <td colspan="4" class="top_cell"><input name="ck_tel" type="text" id="ck_tel" value="<?php echo $row_rstSix['ck_tel']; ?>" size="35"></td>

        </tr>

        <tr>

          <td class="right_cell">Contact's email: </td>

          <td colspan="4" class="top_cell"><input name="ck_email" type="text" id="ck_email" value="<?php echo $row_rstSix['ck_email']; ?>" size="45"></td>

        </tr>

        <tr>

          <td class="right_cell"> </td>

          <td colspan="4" class="top_cell"> </td>

        </tr>

        <tr>

          <td class="right_cell"> </td>

          <td colspan="4" class="top_cell"> </td>

        </tr>

        <tr>

          <td class="right_cell">My own notes: </td>

          <td colspan="4" class="top_cell"><textarea name="ck_notes" cols="75" rows="4" id="ck_notes"><?php echo $row_rstSix['ck_notes']; ?></textarea></td>

        </tr>

        <tr>

          <td class="right_cell">Confirm and Submit: </td>

          <td width="10%"><input type="submit" name="Submit" value="Submit">

          </td>

          <td width="22%"><a href="../index.htm">Return To Website</a></td>

          <td width="9%"><a href="chk_access.php?org=<?php echo $row_rstSix['ck_organisation']; ?>">Access</a></td>

          <td width="39%"><a href="chk_insert.php">List</a></td>

        </tr>

        <tr>

          <td class="right_cell">**These fields are required.</td>

          <td colspan="4"> </td>

        </tr>

        <tr>

          <td class="right_cell"> </td>

          <td colspan="4"> </td>

        </tr>

      </table>

      <input type="hidden" name="MM_update" value="form1">

    </form></td>

Any help most gratefully received.

This topic has been closed for replies.

2 replies

sudarshan.t
Inspiring
April 13, 2012

Try loading your site on http://browserlab.adobe.com and compare multi-browsers there. Let us know what the results are.

April 13, 2012

Do you have any style definitions for the id "cel_blb" ?

smiffy47Author
Known Participant
April 13, 2012

Thanks Burak Ueda. I have no style definitions for the id "cel_blb". As you can see the cell in question has the style "top_cell" applied to it, as do the other form elements. On my .css page "top_cell" simply reads:

.top_cell {

    vertical-align: top;

}

smiffy47Author
Known Participant
April 14, 2012

I guess there seems to be an issue with one or more of add-ons you've installed in Firefox. Did you also check in FF4 (without Safe Mode)?

Try doing the following:

First backup your Database, then try one of these 2 options:

1. Change your DB collation type to utf8_general

Check in FF11.

2. Change the type of cel_blb to text instead of mediumtext

Check in FF11.

See of either of these options work.

If not, let us know what character set you're using in your HTML header (post your HTML header if possible). Also, post a list of all your add-ons that you've installed on Firefox. In firefox, type about:addons in your addressbar to bring up the list of all add-ons.


Thanks for following this up, Sudarshan.

Your 2 suggestions in the previous post yielded no improvement.

I post below the portion of the webpage that precedes the form quoted above.  I wonder if the use of TinyMCE is causing the problem.

<?php require_once('../../Connections/tormented3.php'); ?>

<?php

function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

{

  $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $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 cel_contents SET cel_tel=%s, cel_fax=%s, cel_hlp=%s, cel_email=%s, cel_web=%s, cel_add=%s, cel_blb=%s, cel_hndts=%s WHERE cel_org=%s",

                       GetSQLValueString($_POST['cel_tel'], "text"),

                       GetSQLValueString($_POST['cel_fax'], "text"),

                       GetSQLValueString($_POST['cel_hlp'], "text"),

                       GetSQLValueString($_POST['cel_email'], "text"),

                       GetSQLValueString($_POST['cel_web'], "text"),

                       GetSQLValueString($_POST['cel_add'], "text"),

                       GetSQLValueString($_POST['cel_blb'], "text"),

                       GetSQLValueString($_POST['cel_hndts'], "text"),

                       GetSQLValueString($_POST['cel_org'], "text"));

  mysql_select_db($database_tormented3, $tormented3);

  $Result1 = mysql_query($updateSQL, $tormented3) or die(mysql_error());

}

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {

  $updateSQL = sprintf("UPDATE chk_sixmonth SET ck_town=%s, ck_manager=%s, ck_contact=%s, ck_firstname=%s, ck_lastname=%s, ck_position=%s, ck_tel=%s, ck_email=%s, ck_notes=%s WHERE ck_organisation=%s",

                       GetSQLValueString($_POST['ck_town'], "text"),

                       GetSQLValueString($_POST['ck_manager'], "text"),

                       GetSQLValueString($_POST['ck_contact'], "text"),

                       GetSQLValueString($_POST['ck_firstname'], "text"),

                       GetSQLValueString($_POST['ck_lastname'], "text"),

                       GetSQLValueString($_POST['ck_position'], "text"),

                       GetSQLValueString($_POST['ck_tel'], "text"),

                       GetSQLValueString($_POST['ck_email'], "text"),

                       GetSQLValueString($_POST['ck_notes'], "text"),

                       GetSQLValueString($_POST['cel_org'], "text"));

  mysql_select_db($database_tormented3, $tormented3);

  $Result1 = mysql_query($updateSQL, $tormented3) or die(mysql_error());

}

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {

  $updateSQL = sprintf("UPDATE passwords SET firstname=%s, email=%s WHERE organisation=%s",

                       GetSQLValueString($_POST['ck_firstname'], "text"),

                       GetSQLValueString($_POST['ck_email'], "text"),

                       GetSQLValueString($_POST['cel_org'], "text"));

  mysql_select_db($database_tormented3, $tormented3);

  $Result1 = mysql_query($updateSQL, $tormented3) or die(mysql_error());

}

$colname_rstUpEntry = "1";

if (isset($_GET['org'])) {

  $colname_rstUpEntry = (get_magic_quotes_gpc()) ? $_GET['org'] : addslashes($_GET['org']);

}

mysql_select_db($database_tormented3, $tormented3);

$query_rstUpEntry = sprintf("SELECT * FROM cel_contents WHERE cel_org = '%s'", $colname_rstUpEntry);

$rstUpEntry = mysql_query($query_rstUpEntry, $tormented3) or die(mysql_error());

$row_rstUpEntry = mysql_fetch_assoc($rstUpEntry);

$totalRows_rstUpEntry = mysql_num_rows($rstUpEntry);

$colname_rstSix = "1";

if (isset($_GET['org'])) {

  $colname_rstSix = (get_magic_quotes_gpc()) ? $_GET['org'] : addslashes($_GET['org']);

}

mysql_select_db($database_tormented3, $tormented3);

$query_rstSix = sprintf("SELECT * FROM chk_sixmonth WHERE ck_organisation = '%s'", $colname_rstSix);

$rstSix = mysql_query($query_rstSix, $tormented3) or die(mysql_error());

$row_rstSix = mysql_fetch_assoc($rstSix);

$totalRows_rstSix = mysql_num_rows($rstSix);

$colname_rstPass = "1";

if (isset($_GET['org'])) {

  $colname_rstPass = (get_magic_quotes_gpc()) ? $_GET['org'] : addslashes($_GET['org']);

}

mysql_select_db($database_tormented3, $tormented3);

$query_rstPass = sprintf("SELECT organisation, firstname FROM passwords WHERE organisation = '%s'", $colname_rstPass);

$rstPass = mysql_query($query_rstPass, $tormented3) or die(mysql_error());

$row_rstPass = mysql_fetch_assoc($rstPass);

$totalRows_rstPass = mysql_num_rows($rstPass);

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>Admin  Data Update</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="../css/mentalhealth_admin.css" rel="stylesheet" type="text/css">

<title>TinyMCE Test</title>

<script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>

<script language="javascript" type="text/javascript">

<!--

tinyMCE.init({

    // General options

    mode : "textareas",

    theme : "advanced",

    plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

    // Theme options

    theme_advanced_buttons1 : "bold,italic,|,bullist,|",

    theme_advanced_buttons2 : "",

    theme_advanced_buttons3 : "",

    theme_advanced_buttons4 : "",

    theme_advanced_toolbar_location : "bottom",

    theme_advanced_toolbar_align : "left",

    theme_advanced_statusbar_location : "bottom",

    theme_advanced_resizing : true,

    // Replace values for the template plugin

    template_replace_values : {

        username : "Some User",

        staffid : "991234"

    }

});

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)&&d.all) x=d.all; for (i=0;!x&&i<d.forms.length;i++) x=d.forms;

  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;

}

function MM_validateForm() { //v4.0

  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;

  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args);

    if (val) { nm=val.name; if ((val=val.value)!="") {

      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');

        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';

      } else if (test!='R') { num = parseFloat(val);

        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';

        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');

          min=test.substring(8,p); max=test.substring(p+1);

          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';

    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }

  } if (errors) alert('The following error(s) occurred:\n'+errors);

  document.MM_returnValue = (errors == '');

}

//-->

</script>

</head>

<body>

<table width="100%"  border="0" cellspacing="0" cellpadding="2">

  <tr>

    <td> </td>

    <td class="cellcolour"><h3>Admin Page - Content details</h3>

    </td>

    <td class="cellcolour"><h4><?php echo $row_rstUpEntry['cel_org']; ?> - Website Entry PK: <?php echo $row_rstUpEntry['cel_pk']; ?></h4></td>

    <td> </td>

  </tr>

  <tr>

    <td> </td>

    <td colspan="2" rowspan="10"><form name="form1" method="POST" action="<?php echo $editFormAction; ?>">

      <table width="100%"  border="0" cellspacing="0" cellpadding="2">

etc etc.

Thanks again for looking.