0

Good Afternoon,

I'm hoping someone can tell me how to resolve an issue that will apparently be pretty wide spread within our membership.

I have an ad Directory that was created for our members to do member to member advertising with a component for public advertising, and everything came together nicely. Testing went well, and all was good until It was made available for members use.

I began having members tell me that they submitted an ad, and it showed up in the directory, but when they went to make changes in it, the form that should have displayed the ad was blank. I had tested it many times and never ran across that issue.

Anyway, long story short, the only difference is that they were using IE, and I was using Firefox and/or Chrome.

Can anyone tell me what would cause that to happen?

The ad is in the database, and it displays fine in the directory, but when it is displayed in the form (standard html form generated by PHP script), none of the data appears.

Any suggestions or pointers in the right direction would be greatly appreciated.

Thanks in advance.

Douglas

If you need to see the code, I can post it, but it is 342 lines long, so didn't think it would be a good thing.

4
Contributors
13
Replies
14
Views
6 Years
Discussion Span
Last Post by showman13
0

I can't imagine that it's because of php/html. Probably due to JS or CSS. If possible ask one of the people affected to look at view source and search for 'form' to see if it is actually there but not displayed. Otherwise post your code.

It's obvious now, but sites should be tested in all browsers, including 'old' versions - IE especially. Very little differences between non-IE browsers, but IE is smelly.

0

Thanks for your response. I used IE after discovering that it was the issue, and my form comes up blank as well. I viewed source, and copied it to paste in here with the exception of a bunch of select options that aren't relevant to the issue.

Still pretty long, and maybe you didn't need it all, but here it is.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link rel="stylesheet" type="text/css" href="all_inc/gen_css.css" />
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <META name="description" content="Description of website for META Tag" >
    <META name="keywords" content="keyword1,keyword2,keyword3 for META Tag" >
    <title>test site</title>


</head>

<body>
<div align="center">

<table align="left" width="900" height="600" cellpadding="3" cellspacing="0">
  <tr>
    <td align="right" colspan="5" background="../images/site_logo_button_905.png" width="905" height="190" valign="top">
    <table align="right" width="895" height="190" cellpadding="0" cellspacing="0">
      <tr>
        <td align="right" colspan="9" width="905" height="145">
        <p class="serif"><table align="right" width="400" height="140" cellspacing="1"><tr><td align="right" valign="middle">&nbsp;</td><td align="right" valign="middle">Referring Member:<br /><a class="Bblue" href="contactus.php">teambuilder</a><br />United States </td></tr></table>
        </p>
        </td>
      </tr>
      <tr>
    <td align="left" valign="top" width="360" height="45">&nbsp;</td>
    <td align="left" valign="middle" width="40" height="45"><a class="bold" href="index.php">Home</a></td>
    <td align="left" valign="middle" width="60" height="45"><a class="bold" href="company.php">Company</a></td>
    <td align="left" valign="middle" width="60" height="45"><a class="bold" href="products.php">Products</a></td>
    <td align="left" valign="middle" width="35" height="45"><a class="bold" href="pubfaq.php">FAQ</a></td>
    <td align="left" valign="middle" width="60" height="45"><a class="bold" href="income.php">Income</a></td>
    <td align="left" valign="middle" width="60" height="45"><a class="bold" href="contactsupport.php">Support</a></td>
<td align="left" valign="middle" height="45">&nbsp;</td><td align="left" valign="middle" width="30" height="45">&nbsp;</td>      </tr>
    </table>


    </td>
  </tr>
  <tr>
    <td colspan="5" height="350">

<table align="center" width="900" height="350" cellpadding="5" cellspacing="3">
  <tr>
    <td align="left" valign="top" width="150" height="350">
      <ul>
          <p class="Lmed">Members Menu</p>

        <br />
    <li class="sqblue"><a class="bold" href="memberbo.php">Member Main</a></li>
    <li class="sqblue"><a class="bold" href="memfaq.php">Member FAQ</a></li>
    <li class="sqblue"><a class="bold" href="#">Training</a></li>
    <li class="sqblue"><a class="bold" href="referrals.php">Referrals</a></li>
   <li class="sqblue"><a class="bold" href="payment_upgrade.php">Payment and Upgrade Center</a></li>
     <li class="sqblue"><a class="bold" href="direct_ads.php">Ad Directory</a></li>
    <li class="sqblue"><a class="bold" href="directory_mgmt.php">Ad Management</a></li>
    <li class="sqblue"><a class="bold" href="archives" target="_blank">Archives</a></li>
    <li class="sqblue"><a class="bold" href="memupdate.php">Personal Info</a></li>
    <li class="sqblue"><a class="bold" href="newpass.php">Change Password</a></li>
    <li class="sqblue"><a class="bold" href="logout.php">Log Out</a></li>
  </ul>    </td>
    <td align="center" valign="top" width="750">

<table align="center" width="100%">
  <tr>
    <td align="center"><h2>Directory Ad Management</h2></td>
  </tr>
  <tr>
    <td align="center">
<script type="text/javascript"><!--
function textCounter (field, countField, maxLimit)
{
        if (field.value.length > maxLimit)
                field.value = field.value.substring(0, maxLimit);
        else
                countField.value = maxLimit - field.value.length;
}
//--></script>



<form name="update_ad" action="/directory_mgmt.php" method="POST">
<table align="center" width="100%" height="15" border="0" bordercolor="#3366FF">
  <tr>
    <td align="center" colspan="6"><span class="BlargeG">- Step  Ad -</span></td>
  </tr>
  <tr>
    <td align="right">AD Title : </td>
    <td align="left" colspan="5">
        <input name="title" value="" size="64" maxlength="64" />
    </td>
  </tr>
  <tr>
    <td align="right">Link URL : </td>
    <td align="left" colspan="5">
        <input name="url" value="" size="64" maxlength="128" /><br />
        <span class="smalR">Use ONLY fully qualified url beginning with http://. Example <span class="mediG">http://www.yourweblink.com</span></span>
    </td>
  </tr>
  <tr>
    <td align="right">Select Category : </td>
    <td align="left" colspan="5">
<select name="category">
<option value="13">Arts & Entertainment</option>
<!-- Removed majority of the select options to save space ->
<option value="146">&nbsp;&nbsp;&nbsp;Copywriting</option>
</select>    </td>
  </tr>

  <tr>
    <td align="right">Body of AD :</td>
    <td align="left" colspan="5">
<span class="mediG">(2000 characters max)(Use HTML Formatting)</span>
<span class="mediB"><a href="html_cheat_sheet.php" target="_blank">(Click for HTML Cheat Sheet)</a></span>
<br />
<textarea name="ad_body" rows="10" cols="60" onkeydown="textCounter(this.form.ad_body, this.form.remainingLength, 2000);" onkeyup="textCounter(this.form.ad_body, this.form.remainingLength, 2000);"></textarea>

<br />
<span class="smalR">Characters remaining: </span><input readonly type="text" name="remainingLength" size="5" maxlength="4" value="2000" />
    </td>
  </tr>
  <tr>
    <td align="right" width="100">Current Status : </td>
    <td align="left" width="100"><span class="BlargeG">Available</span></td>
    <td align="right" width="100">Date Created : </td>
    <td align="left" width="100"><span class="BlargeG"></span></td>
    <td align="right" width="100">Last Updated : </td>
    <td align="left" width="100"><span class="BlargeG"></span></td>
  </tr>
  <tr>
<input type="hidden" name="ad_step" value="" />
<input type="hidden" name="mem_id" value="10000002" />
<input type="hidden" name="cur_status" value="" />
<input type="hidden" name="created" value="" />
<input type="hidden" name="updated" value="" />
<input type="hidden" name="email" value="email@douglassaferite.com" />
<input type="hidden" name="cur_step" value="3" />
<input type="hidden" name="adv_id" value="" />
<input type="hidden" name="cat_id" value="" />
<input type="hidden" name="subbed" value="u" />
    <td align="center" colspan="3"><br />
        <input type="submit" name="ad_option" value="Update Ad" />
    </td>
    <td align="center" colspan="3"><br />
        <input type="submit" name="ad_option" value="Delete Ad" />
    </td>
  </tr>
 </table>
</form>
    </td>

  </tr>
</table>
      </td>
  </tr>
</table>
          </td>
    </tr>
    <tr>
    <td align="left" width="895" height="50" colspan="3">

    </td>
  </tr>
    <tr>
    <td align="left" width="895" height="123" colspan="3" background="images/site_foot_905.png">
        <p class="cb">
        <a href="index.php" class="tiny">&laquo; Home &raquo;</a>
        <a href="contactsupport.php" class="tiny">&laquo; Support &raquo;</a>
        <a href="privacy.php" class="tiny">&laquo; Privacy Policy &raquo;</a>
        <a href="terms.php" class="tiny">&laquo; Terms of Use &raquo;</a>
        <a href="agreement.php" class="tiny">&laquo; User Agreement &raquo;</a>
        <a href="memlogin.php" class="tiny">&laquo; Member Login &raquo;</a>
        </p>
        <p class="Ctiny">&nbsp;</p>
        <p class="Ctiny">Copyright (c) 2010 - test site - All Rights Reserved</p>
    </td>
  </tr>
</table>

</div>
</body>
</html>
0

And Yes, I know all the form fields are empty, but that is only on IE...

Here is the view source of the form portion when using Firefox, that shows the fields all have values.

<form name="update_ad" action="/directory_mgmt.php" method="POST">
<table align="center" width="100%" height="15" border="0" bordercolor="#3366FF">
  <tr>
    <td align="center" colspan="6"><span class="BlargeG">- Step 1 Ad -</span></td>
  </tr>
  <tr>

    <td align="right">AD Title : </td>
    <td align="left" colspan="5">
        <input name="title" value="Get your decks Built by an Expert..." size="64" maxlength="64" />
    </td>
  </tr>
  <tr>
    <td align="right">Link URL : </td>
    <td align="left" colspan="5">

        <input name="url" value="http://www.douglasdidit.com" size="64" maxlength="128" /><br />
        <span class="smalR">Use ONLY fully qualified url beginning with http://. Example <span class="mediG">http://www.yourweblink.com</span></span>
    </td>
  </tr>
  <tr>
    <td align="right">Select Category : </td>
    <td align="left" colspan="5">

<select name="category"><option value="13">Arts & Entertainment</option><option value="146">&nbsp;&nbsp;&nbsp;Copywriting</option></select>    </td>

  </tr>

  <tr>
    <td align="right">Body of AD :</td>
    <td align="left" colspan="5">
<span class="mediG">(2000 characters max)(Use HTML Formatting)</span>
<span class="mediB"><a href="html_cheat_sheet.php" target="_blank">(Click for HTML Cheat Sheet)</a></span>
<br />
<textarea name="ad_body" rows="10" cols="60" onkeydown="textCounter(this.form.ad_body, this.form.remainingLength, 2000);" onkeyup="textCounter(this.form.ad_body, this.form.remainingLength, 2000);">Take a look at some of my past projects
</textarea>

<br />
<span class="smalR">Characters remaining: </span><input readonly type="text" name="remainingLength" size="5" maxlength="4" value="2000" />
    </td>
  </tr>
  <tr>
    <td align="right" width="100">Current Status : </td>
    <td align="left" width="100"><span class="BlargeG">Approved</span></td>
    <td align="right" width="100">Date Created : </td>

    <td align="left" width="100"><span class="BlargeG">2011-01-02 17:45:06</span></td>
    <td align="right" width="100">Last Updated : </td>
    <td align="left" width="100"><span class="BlargeG">2011-01-05 09:26:41</span></td>
  </tr>
  <tr>
<input type="hidden" name="ad_step" value="1" />
<input type="hidden" name="mem_id" value="10000002" />
<input type="hidden" name="cur_status" value="A" />
<input type="hidden" name="created" value="2011-01-02 17:45:06" />

<input type="hidden" name="updated" value="2011-01-05 09:26:41" />
<input type="hidden" name="email" value="email@douglassaferite.com" />
<input type="hidden" name="cur_step" value="3" />
<input type="hidden" name="adv_id" value="23" />
<input type="hidden" name="cat_id" value="142" />
<input type="hidden" name="subbed" value="u" />
    <td align="center" colspan="3"><br />
        <input type="submit" name="ad_option" value="Update Ad" />
    </td>
    <td align="center" colspan="3"><br />
        <input type="submit" name="ad_option" value="Delete Ad" />
    </td>

  </tr>
 </table>
</form>
0

I have tried disabling CSS and removing the javascript in the page, and neither one has any effect on the outcome.

I just find it strange that it works perfectly in other browsers and not IE. I could see the layout changing(does it all the time), but what baffles me is that it doesn't recognize the PHP variables that are (or should be) rendered as the data for the form fields.

And I just realized by looking at the database, that when someone submits their ad through IE, one of the fields in the database is set to 0 that should never be 0. It always has a value between 1 and 10 for the 10 steps of the program. This just doesn't make any sense.

I think for a short term solution, I'll suggest that people install Firefox or one of the other known good browsers, and quit using IE... But I still need to find the resolution to this issue when I have more time to invest in finding it.

Thank you for your response, and if you have any revelations or come up with any other suggestions to find the issue, please feel free to let me know.

Douglas

0

Could you post the PHP that calls the variables to be placed in the values? We could probably help if we saw the supposed problem code.

0

Could you post the PHP that calls the variables to be placed in the values? We could probably help if we saw the supposed problem code.

First off, thank you for taking the time to help me work through this.. I truly appreciate your time and assistance.

It is rather long, but here it is...

I just found a new wrinkle... I decided to test the registration script which naturally uses a form for input, and I use the same process to maintain the data if they make an error and have to go back, and that works just fine...

So, would that mean that there is a syntax error in the generated html code, and how could that prevent the variable values from appearing?

ALSO, just noticed when I pasted the code in here that there may be an issue with the php... when you use print and then a variable name to assign to a hidden variable in a form is it important to have a space between the print and the $variable? Or would that make a difference? I noticed on lines 81 through 85 that there is none. Could that cause a problem?

<?php
include "all_inc/config_site.php";
include "all_inc/pghead.php";
include "all_inc/pgtop.php";
include "all_inc/body_table_top.php";
include "all_inc/logcheck.php";
// IF arriving here, then member is logged in, so use their $affiliate for query

if (!isset($_POST['subbed'])) {   // If form has not yet been posted get current data
    $sql = "SELECT mem_id, email, mem_status FROM members WHERE user = '$affiliate' LIMIT 1";
    $result=mysql_query($sql) or die(mysql_error);
    $row=mysql_fetch_array($result);
        $mem_id=$row[0]; // orig_email used for later check for change
        $email=$row[1]; // orig_email used for later check for change
        $mem_status=$row[2];

    $sqlr = "SELECT cur_step FROM step_table WHERE mem_id = '$mem_id' LIMIT 1";
    $result2=mysql_query($sqlr) or die(mysql_error);
    $row2=mysql_fetch_array($result2);
        $cur_step=$row2[0];  // Get Current Step for number of optional ads
    $subbed='n';

}else{  //  After first time through, all pertinent variables are passed through forms
    $subbed=$_POST['subbed'];
  if ($subbed=='s'){
  $ad_step=$_POST['ad_step'];
  $mem_id=$_POST['mem_id'];
  $email=$_POST['email'];
  $cur_step=$_POST['cur_step'];
  // Get selected Step ad to display
$sql1 = "SELECT adv_id, cat_id, title, ad_body, url, status, create_date, last_update FROM adv_table WHERE mem_id='$mem_id' AND adv_step='$ad_step' LIMIT 1";
$result1 = mysql_query($sql1);
$num_rows = mysql_num_rows($result1);
    if ($num_rows>0){
        $row1 = mysql_fetch_array($result1);
        $adv_id=$row1[0];
        $cur_cat=$cat_id=$row1[1];
        $cur_title=$row1[2];
        $cur_ad_body=$row1[3];
        $cur_url=$row1[4];
        $cur_status=$row1[5];
        $created=$row1[6];
        $updated=$row1[7];
    }else{ // No current Step ad on file  for this step
        $adv_id='';
        $cur_cat=$cat_id='';
        $cur_title='';
        $cur_ad_body='';
        $cur_url='';
        $cur_status='';
        $created='';
        $updated='';
    }
  }
}
?>
<table align="center" width="100%">
  <tr>
    <td align="center"><h2>Directory Ad Management</h2></td>
  </tr>
  <tr>
    <td align="center">
<?php

if ($subbed=='u'){  // Check for errors and update DB  thru line 103 +-
//print "<br />ad option is ".$ad_option;
$cat_id=$category;
    if ($ad_option == 'Delete Ad'){
      // Verify that Delete was selected
?>
<form name="delete_ad" action="<?php print $_SERVER['PHP_SELF']; ?>" method="POST">
  <table align="center" width="100%" height="15" border="0" bordercolor="#3366FF">
    <tr>
        <td align="center" colspan="6"><span class="BlargeG">- Step <?php print $ad_step;?> Ad -</span></td>
    </tr>
    <tr>
        <td align="center" colspan="6"><span class="BlargeG">Are you sure you want to DELETE this AD?</span></td>
    </tr>
    <input type="hidden" name="ad_step" value="<?php print $ad_step;?>" />
    <input type="hidden" name="mem_id" value="<?php print $mem_id;?>" />
    <input type="hidden" name="cur_status" value="<?php print$cur_status;?>" />
    <input type="hidden" name="created" value="<?php print$created;?>" />
    <input type="hidden" name="updated" value="<?php print$updated;?>" />
    <input type="hidden" name="email" value="<?php print$email;?>" />
    <input type="hidden" name="cur_step" value="<?php print$cur_step;?>" />
    <input type="hidden" name="adv_id" value="<?php print $adv_id;?>" />
    <input type="hidden" name="cat_id" value="<?php print $cat_id;?>" />
    <input type="hidden" name="subbed" value="u" />
      <tr>
        <td align="center" colspan="3"><br />
    <input type="submit" name="ad_option" value="Confirm Delete Ad" />
        </td>
        <td align="center" colspan="3"><br />
    <input type="submit" name="ad_option" value="DO NOT DELETE" />
        </td>
    </tr>
  </table>
</form>
<?php
    exit;
    }elseif($ad_option == 'Confirm Delete Ad'){
      mysql_query("DELETE FROM adv_table WHERE adv_id='$adv_id'");
   print"<br /><br /><span class=\"BlargeG\">Step ".$ad_step." Advertisement has been DELETED.</span>";
   exit;
    }elseif($ad_option == 'DO NOT DELETE'){
   print"<br /><br /><span class=\"BlargeG\">NO ACTION has been taken with Step ".$ad_step." Advertisement.</span>";
   exit;
    }

// CHECK DATA for valid entry before updating
$title=cleanString($_POST['title']);
$url=cleanString($_POST['url']);   ///   need to check for valid URL
$ad_body=cleanString($_POST['ad_body']);
$email=cleanString($_POST['email']);
$cur_step=cleanString($_POST['cur_step']);
$adv_id=$_POST['adv_id'];
$ad_step=$_POST['ad_step'];
    if (!$title){$errors[] = "You MUST Enter a Title for your Ad."; }
    if (!$url){$errors[] = "You MUST Enter a Link URL for your Ad."; }
    if (!$ad_body){$errors[] = "You MUST Enter the Body/description for your Ad."; }

// If any errors, display them, BUT if NO ERRORS then add rec to DB
    if(count($errors) > 0){
?>
        <p class="cb">There were some problems with submitting your Information Update:</p>
        <ul>
        <?php  foreach($errors as $error){  ?>
            <li><?php print $error;?></li><br />
        <?php
            }
        ?>
        </ul>
<!-- CREATE HIDDEN FORM WITH ALL DATA AND SUBMIT SO FIELDS ARE REFILLED-->
         <br /><br />
<form name="retry" action="<?php print $_SERVER['PHP_SELF']; ?>" method="POST">
       <input type="hidden" name="cur_title" value="<?php print $title;?>">
       <input type="hidden" name="cur_url" value="<?php print $url;?>">
       <input type="hidden" name="cur_ad_body" value="<?php print $ad_body;?>">

       <input type="hidden" name="subbed" value="e" />
       <input type="hidden" name="adv_id" value="<?php print $adv_id;?>" />
       <input type="hidden" name="cat_id" value="<?php print $cat_id;?>" />
       <input type="hidden" name="ad_step" value="<?php print $ad_step;?>" />
       <input type="hidden" name="mem_id" value="<?php print $mem_id;?>" />
       <input type="hidden" name="cur_step" value="<?php print $cur_step;?>" />
       <input type="hidden" name="email" value="<?php print $email;?>" />

       <p class="cb"><input type="submit" name="correct" value="Please Correct Errors" /></p>
</form>
<?php
exit;
    }else{   // update DB and display page - set ad_step to updated step
    //  if new ad - do Insert / if Previously existing ad - do update
     if($adv_id){
       //print "<br />adv_id is ".$adv_id;
        $sql_u = "UPDATE adv_table SET cat_id='$cat_id', title='$title', ad_body='$ad_body', url='$url', status='A', last_update=now() WHERE adv_id='$adv_id'";
        mysql_query($sql_u) or die(mysql_error);
     }else{
        $sql_i = "INSERT INTO adv_table VALUES ('', '$mem_id', '$cat_id', '$ad_step', '$title', '$ad_body', '$url', 'A', now(), now())" ;
        mysql_query($sql_i) or die(mysql_error);
        }


 //SEND AN EMAIL TO NOTIFY OF CHANGES TO Step Advertisement
$to = $email;
$subject = "Step ".$ad_step." Advertisement Changed";
$message = "<html><head><title>".$sitename."</title></head><body>
<p>Thank you for updating your Directory Ad Record with the ".$sitename.".</p>";

$message=$message."<p>This email has been sent to you as a courtesy, to inform you that the advertisement record has been changed for your Step ".$ad_step." Directory Ad.</p>
<p>Your username  '".$user."'</p>
<p><a href=\"http://www.".$siteurl."/memberbo.php\">Back Office Link</a></p>";

$message=$message."<p></p>
<p>As Always, Dedicated to our Mutual Success,</p>
<p></p>";
$message .= ".</body></html>";
// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";// More headers
$headers .= "From: <".$adminemail.">" . "\r\n";
$message = wordwrap($message,70);
// Send email
mail($to,$subject,$message,$headers);

        print"<br /><br /><span class=\"BlargeG\">Step ".$ad_step." Advertisement has been updated.</span>";



    }


}elseif ($subbed=='n'){
// Separate form for Step Selection
?>
<p class="cb">Select Step Ad to Modify</p>

<?php if ($cur_step >0){ // If upgraded to at least step 1 then display?>
<p class="CmedG"><?php print($cur_step)?> Available Directory Step Ads:</p>

<form name="choose" action="<?php print $_SERVER['PHP_SELF']; ?>" method="POST">
<input type="hidden" name="mem_id" value="<?php print $mem_id;?>" />
<input type="hidden" name="email" value="<?php print $email;?>" />
<input type="hidden" name="cur_step" value="<?php print $cur_step;?>" />
<input type="hidden" name="adv_id" value="<?php print $adv_id;?>" />
<input type="hidden" name="cat_id" value="<?php print $cat_id;?>" />
<input type="hidden" name="subbed" value="s" />
<table align="center" width="80%" height="15">
  <tr>
<?php
for ($step=1; $step<=$cur_step; ++$step){
    $ad_present='0';
    $sql = "SELECT adv_id FROM adv_table WHERE mem_id = '$mem_id' AND adv_step = '$step' LIMIT 1";
    $result=mysql_query($sql) or die(mysql_error);
    $row=mysql_fetch_array($result);
        $ad_present=$row[0]; // check if ad currently in place
        if ($ad_present>0){
          $present='ButtonPalm'; //  display the palm tree if ad placed for this step
        }else{
          $present='button'; // display the number button if no ad placed for this step
        }
?>
    <td align="center">
      <input type="image" src="images/<?php print $present;?><?php print $step;?>.png" name="ad_step"value="<?php print $step;?>" width="50" height="50" alt="<?php print $step;?>"/>

    </td>
<?php
        }
?>
  </tr>
</table>
</form>
<p class="CmedG">If the Palms are Showing, Your Business is Growing</p>
<p class="Ctiny">Palm Trees indicate ads have been placed and accepted for that step</p>

<?php
    }else{ // if not upgraded, nothing to display
?>
<p class="CmedG">You must Upgrade to Step 1 or higher<br />to place your ad(s) in the Directory.</p>
<?php
    }
}else{    // $subbed must be 's'  or 'e'
?>
<script type="text/javascript"><!--
function textCounter (field, countField, maxLimit)
{
        if (field.value.length > maxLimit)
                field.value = field.value.substring(0, maxLimit);
        else
                countField.value = maxLimit - field.value.length;
}
//--></script>

<form name="update_ad" action="<?php print $_SERVER['PHP_SELF']; ?>" method="POST">
<table align="center" width="100%" height="15" border="0" bordercolor="#3366FF">
  <tr>
    <td align="center" colspan="6"><span class="BlargeG">- Step <?php print $ad_step;?> Ad -</span></td>
  </tr>
  <tr>
    <td align="right">AD Title : </td>
    <td align="left" colspan="5">
        <input name="title" value="<?php print $cur_title;?>" size="64" maxlength="64" />
    </td>
  </tr>
  <tr>
    <td align="right">Link URL : </td>
    <td align="left" colspan="5">
        <input name="url" value="<?php print$cur_url;?>" size="64" maxlength="128" /><br />
        <span class="smalR">Use ONLY fully qualified url beginning with [url]http://.[/url] Example </span><span class="mediG">http://www.yourweblink.com</span>
    </td>
  </tr>
  <tr>
    <td align="right">Select Category : </td>
    <td align="left" colspan="5">
<?php
//  include the Category selection here.
include "category_list.php";
?>
    </td>
  </tr>

  <tr>
    <td align="right">Body of AD :</td>
    <td align="left" colspan="5">
<span class="mediG">(2000 characters max)(Use HTML Formatting)</span>
<span class="mediB"><a href="html_cheat_sheet.php" target="_blank">(Click for HTML Cheat Sheet)</a></span>
<br />
<textarea name="ad_body" rows="10" cols="60" onkeydown="textCounter(this.form.ad_body, this.form.remainingLength, 2000);" onkeyup="textCounter(this.form.ad_body, this.form.remainingLength, 2000);"><?php print $cur_ad_body; ?></textarea>

<br />
<span class="smalR">Characters remaining: </span><input readonly type="text" name="remainingLength" size="5" maxlength="4" value="2000" />
    </td>
  </tr>
  <tr>
    <td align="right" width="100">Current Status : </td>
<?php
  if ($cur_status=='S'){
    $display_status='Submitted';
  }elseif ($cur_status=='A'){
    $display_status='Approved';
  }elseif ($cur_status=='R'){
    $display_status='Rejected';
  }else{
    $display_status='Available';
  }
?>
    <td align="left" width="100"><span class="BlargeG"><?php print$display_status;?></span></td>
    <td align="right" width="100">Date Created : </td>
    <td align="left" width="100"><span class="BlargeG"><?php print$created;?></span></td>
    <td align="right" width="100">Last Updated : </td>
    <td align="left" width="100"><span class="BlargeG"><?php print$updated;?></span></td>
  </tr>
<input type="hidden" name="ad_step" value="<?php print $ad_step;?>" />
<input type="hidden" name="mem_id" value="<?php print $mem_id;?>" />
<input type="hidden" name="cur_status" value="<?php print$cur_status;?>" />
<input type="hidden" name="created" value="<?php print$created;?>" />
<input type="hidden" name="updated" value="<?php print$updated;?>" />
<input type="hidden" name="email" value="<?php print$email;?>" />
<input type="hidden" name="cur_step" value="<?php print$cur_step;?>" />
<input type="hidden" name="adv_id" value="<?php print $adv_id;?>" />
<input type="hidden" name="cat_id" value="<?php print $cat_id;?>" />
<input type="hidden" name="subbed" value="u" />
  <tr>
    <td align="center" colspan="3"><br />
        <input type="submit" name="ad_option" value="Update Ad" />
    </td>
    <td align="center" colspan="3"><br />
        <input type="submit" name="ad_option" value="Delete Ad" />
    </td>
  </tr>
 </table>
</form>
<?php
}
?>
    </td>

  </tr>
</table>
  <?php include 'all_inc/body_table_bottom.php';?>
  <?php include 'all_inc/pgbottom.php';?>
0

I believe you have found your problem. You do need the space after print. I am going to look through your code in detail though to see if I can find any other errors that may cause it.

0

Try replacing line 32 with

$result1 = mysql_query($sql1) or die(mysql_error());

and see if that causes an error message. Looking at your code, I can't see anything wrong with it but I get the feeling I'm missing something fairly obvious. Hopefully this will provide an error message and say what is wrong.

0

Thanks Borzoi for the responses.

I did plug that in to try it, but had no real expectations that it would provide any additional information since the script works great in all browsers except IE, so I doubt that it is the functionality of the php or queries...

My guess is that it has something to do with the html that is generated for that page, that IE doesn't like. I realized I have other pages on the same site that have forms that uses the same functionality, and they work just fine. I just need to take the time to see if I can decipher what kind of erroneous html I'm creating through the script.

My temporary solution(work around) has been to check which browser someone is using and if it is IE, I have a yellow background with red letter warning about using IE, and giving them a link to Firefox to download a 'standards compliant' browser...

Not an ideal solution, but a solution none the less.

Any other suggestions or helpful hints would be greatly appreciated, but I'm going to mark this as solved/resolved as it isn't real high on my priority list at the moment, and I don't want to forget, and leave it open...

Thanks again for your help.

Douglas

0

I'll have another look through your code for you and try to spot anything I may have missed.

0

From what I can tell, IE is running the "else" part of your if statement that starts on line 34 so try replacing lines 32 to 36 with:

$result1 = mysql_query($sql1);
$row1 = mysql_fetch_array($result1);
$num_rows = count($row1);
if ($num_rows>0){
$adv_id=$row1[0];

You could also try using echo instead of print but I doubt that would change the result. I'm going to keep looking through your code to see if I can find any other possible causes.

0

There again, no different results.

Like I said, I don't think it is in the PHP code except possibly in the html formatting that it generates. It works perfectly on other browsers, and I don't think the PHP cares what browser it is being implemented through, it does the same thing no matter what.

Only variation will be how the browser handles the html output from the php. If I'm wrong here, please correct me.

Thanks again though for your continued attempts to resolve this issue. It would be nice to find the resolution, but I've gotten to the point that there are more immediate issues I need to deal with so this program can be launched on the 15th.

There are alot of members waiting for launch, so they can begin getting paid weekly...

Douglas

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.