Advertisement

08.25.2008 at 03:47PM PDT, ID: 23676876
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.2

How do I get rid of "code bits" that appear only on Firefox?

Asked by JackoPinto in PHP and Databases

Tags: ,

Hi,

I was recently helped by experts to create a query to display data from a dbase. The code works great but I have a problem.

For some reason on Firefox on both PC and Mac, the "bottom statement"  no only shows data but also some of the code.

I've included a snippet of the code. The problem is with the "bottom part".  

This is the "part" that presents the problem:
<hr />
<div style="font-family:Verdana; font-size:10pt; color:#999999">

<?php
      echo "Página <b>$page</b> de <b>$page_count</b>, mostrando <b>$per_page</b> por página<br>";
      if ($page > 1)
      {
            echo '<a href="EventosDCI.php?page='.($page-1).'">Anterior</a>&nbsp;&nbsp;&nbsp;&nbsp; ';
      }
      if ($page < $page_count)
      {
            echo '<a href="EventosDCI.php?page='.($page+1).'">Siguiente</a>&nbsp;&nbsp;&nbsp;&nbsp; ';      
      }

?>

</div>      

Here's the code that shows up:

$page de $page_count, mostrando $per_page por página
"; if ($page > 1) { echo 'Anterior '; } if ($page < $page_count) { echo 'Siguiente '; },

It shows that instead on only showing the correct message as it does on every other browser.

Thanks for you help, I've tried changing things around and don't know what the problem is. Hope I didn't get confussing.

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
<?php
include 'config.php';
include 'opendb.php';
 
//config
$per_page = 5;
 
// find number of elements and pages
$query = 'SELECT Count(*) `cnt` FROM `ap_form_1`';
$result = mysql_fetch_array(mysql_query($query));
$cnt = $result['cnt'];
$page_count = ceil(intval($cnt) / $per_page);
 
// find current page
$page = max(intval($_REQUEST['page']), 1);
 
// sort by name
 
$start = ($page - 1) * $per_page;
$query = "SELECT  element_1 , DATE_FORMAT(`element_2`,'%m/%d/%Y') as TheElement_2, TIME_FORMAT(`element_14`,'%h:%i %p') as TheElement_14, element_15, element_16, element_17, element_8, element_9,  element_10, element_11, element_13, element_12 FROM `ap_form_1` WHERE DATE_FORMAT(`element_2`,'%Y-%m-%d') > DATE_FORMAT(Now(),'%Y-%m-%d') ORDER BY `element_2` LIMIT $start, $per_page";
$result = mysql_query($query) or die("Error while executing " . $query . ": " . mysql_error() );
 
// fetch each result
while($row = mysql_fetch_assoc($result))
{
      // print three lines for each row
      if (strval($row['element_1']) !== '') echo "<span style=\"color: #000033; font-size: 10pt; font-weight: bold; font-variant: small-caps; padding-bottom: 5px\">{$row['element_1']}</span>";
echo "<br>";
 
if (strval($row['TheElement_2']) !== '') if (strval($row['TheElement_14']) !== '') echo "<span style=\"color: #FF3300; font-size:8pt\">FECHA: <b>{$row['TheElement_2']}</b> / HORA: <b>{$row['TheElement_14']}</b></span>";
echo "<br>";
 
if (strval($row['element_15']) !== '') echo "<span style=\"color: #660000; font-size:12px\"><b>Dirección: </b> {$row['element_15']}</span>";
echo "<br>";
 
 
if (strval($row['element_16']) !== '') if (strval($row['element_17']) !== '') echo "<span style=\"color: #660000; font-size:12px\"><b>{$row['element_16']} , {$row['element_17']}</b></span>";
echo "<br>";
 
 
if (strval($row['element_12']) !== '') echo "<span style=\"color: #000033; font-size: 12px\"><b>Contacto:</b> {$row['element_12']}</span>";
echo "<br>";
 
 
if (strval($row['element_8']) !== '')  echo "<span style=\"color: #666666; font-variant: small-caps; font-size: 8pt\">Tel?fono: <b>{$row['element_8']}</b></span>";
echo "<br>";
 
 
if (strval($row['element_10']) !== '') echo "<a style=\"color: #666666;  font-variant: small-caps; font-size: 8pt; font-weight: bold\" href=\"mailto:{$row['element_10']}\">{$row['element_10']}</a>";
echo "<br>";
 
if (strval($row['element_11']) !== '') echo "<a  style=\"color: #666666; font-variant: small-caps; font-size: 8pt; font-weight: bold\" target=_blank href=\"{$row['element_11']}\">
{$row['element_11']}</a>";
echo "<br>";
 
 
if (strval($row['element_13']) !== '') echo "<span style=\"color: #000033; font-size: 10px\"><b>Costo: </b>$ {$row['element_13']}</span>";
echo "<br><br>";
}
 
 
include 'closedb.php';
?>
 
<hr />
<div style="font-family:Verdana; font-size:10pt; color:#999999">
 
<?php
      echo "Página <b>$page</b> de <b>$page_count</b>, mostrando <b>$per_page</b> por página<br>";
      if ($page > 1)
      {
            echo '<a href="EventosDCI.php?page='.($page-1).'">Anterior</a>&nbsp;&nbsp;&nbsp;&nbsp; ';
      }
      if ($page < $page_count)
      {
            echo '<a href="EventosDCI.php?page='.($page+1).'">Siguiente</a>&nbsp;&nbsp;&nbsp;&nbsp; ';      
      }
 
?>
 
</div>
 
Loading Advertisement...
 
[+][-]08.25.2008 at 04:11PM PDT, ID: 22310183

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.25.2008 at 05:00PM PDT, ID: 22310491

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.25.2008 at 05:06PM PDT, ID: 22310519

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PHP and Databases
Tags: PHP, MySQL, Firefox PC and Mac
Sign Up Now!
Solution Provided By: nanharbison
Participating Experts: 2
Solution Grade: B
 
 
[+][-]08.25.2008 at 08:42PM PDT, ID: 22311443

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.26.2008 at 03:42AM PDT, ID: 22313121

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.26.2008 at 08:43AM PDT, ID: 22316020

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.26.2008 at 08:47AM PDT, ID: 22316060

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.26.2008 at 09:05AM PDT, ID: 22316280

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628