paulkd 59 Newbie Poster

Can you post a var_dump of your actual $_SESSION['cartItems'] ?

paulkd 59 Newbie Poster

Your array has two identical records (both [id] => 2), so I assume you copy/pasted for quickness.
You also have a ; missing in your for statement after $contents

foreach($_SESSION['cartItems'] as $key => $products){
    if($products['id']==$delid) {
        unset($_SESSION['cartItems'][$key]);
    }
}
paulkd 59 Newbie Poster

You can also use array_key_exists

if(array_key_exists('category',$_GET)) {
    if(array_key_exists($_GET['category'], $myarray)) {
        echo $myarray[$_GET['category']];
    } else {
         echo 'not found in array';
    }
}

and shorter and not so pretty.....

if(array_key_exists('category',$_GET)) {
    echo array_key_exists($_GET['category'], $myarray) ? $myarray[$_GET['category']] : 'not found in array';
}

and shorter....and uglier.....

echo (array_key_exists('category',$_GET) AND array_key_exists($_GET['category'], $myarray)) ? $myarray[$_GET['category']] : 'not found in array';
paulkd 59 Newbie Poster

Hi,

The jsfiddle, as you have found, adds the onready handler. The reason I never use the cfform statements is that they seemed to require the same amount of work as simply adding the raw HTML equivalents. Sometimes, they require more work.

paulkd 59 Newbie Poster

I've create a simple jsfiddle.

BTW I'm from a ColdFusion background, but I never used any cfform statements.

paulkd 59 Newbie Poster

What options are in the select?

paulkd 59 Newbie Poster

Who wrote the javascript validation code?

paulkd 59 Newbie Poster

They are all empty. So, presumably the javascript didn't kick in to prevent form submission?

paulkd 59 Newbie Poster

If your checkboxes are there to purely signify that there will be content in a corresponding text field, then I would lose the checkboxes and simply check for form field content in your form handler.

You have too any forms. "There can only be one" (Highlander) :D

diafol commented: But it must be in a Caledonian accent! :) +14
paulkd 59 Newbie Poster

i am using mootools.. i just dont know how to fix the script

So it's not your script?

paulkd 59 Newbie Poster

You still haven't addressed the js omissions I highlighted. However, add this to the top of your PHP form handler for testing.

var_dump($_POST); die;
paulkd 59 Newbie Poster

You haven't set values for nameError, emailError and commentError in your form.addEvent function.

This error is preventing your e.stop() from stopping your form being submitted.

paulkd 59 Newbie Poster

Of course it is. From the PHP help file:-

<?php
// Get a file into an array.  In this example we'll go through HTTP to get
// the HTML source of a URL.
$lines = file('http://www.example.com/');

// Loop through our array, show HTML source as HTML source; and line numbers too.
foreach ($lines as $line_num => $line) {
    echo "Line #<b>{$line_num}</b> : " . htmlspecialchars($line) . "<br />\n";
}
paulkd 59 Newbie Poster

I learn something everyday :-) file()

You should use foreach not for to iterate through your user records.

paulkd 59 Newbie Poster

Mootools :-)

paulkd 59 Newbie Poster

Need a little more snippet.. e.g. where did $user_length come from ?
is u0003:omied:123456-12-1234:male:married:privatesector:dfsfsdf:603-32323242:6016-2343432:omied@gmail.com:omeid123:dingo1234 associated with a variable?

paulkd 59 Newbie Poster

I admit I haven't tried your linked code, because var form = $('comments_form'); does not seem valid to me, which may be the reason you are having this issue.

Quick note: You should always validate server side, even if you have used JavaScript to validate user input.

paulkd 59 Newbie Poster

Hi,

I'm not a JavaScript guru, and I use jQuery because it make client side stuff so easy and logical. That having said, this line (and others) does not appear correct:-

// Get the form
var form = $('comments_form');

What is $('comments_form'); ?

is there another js file that you have not mentioned?

paulkd 59 Newbie Poster

I'm a little puzzled. If you mis-spelt the path name how did your browser output "yes"?

paulkd 59 Newbie Poster

If you are allowed to use a php to store the names instead of a txt file.....

users.php

<?php 

$users = array(
    'paulkd' => array(
        'firstname' => 'Paul',
        'location' => 'Preston'
    ),
    'xianamersu' => array(
        'firstname' => 'Rachel',
        'location' => 'Melbourne'
    )
);

?>

and to check....

<?php
include_once 'users.php';

$usernameToCheck = 'paulkd';

if(array_key_exists($usernameToCheck,$users)) {
    echo 'found';
} else {
    echo 'not found';
}
?>
paulkd 59 Newbie Poster

If error logging is disabled, is it possible your host has disabled your ability to rename?

paulkd 59 Newbie Poster

Yes, this is a "rule" that you could implement. You would need to record the time of each fire (you can overwrite a single variable) and then apply a rule that if a timespan greater than n (500ms in your example) has elapsed between the last recorded fire then this would signify that it was the last fire and take appropriate action.

paulkd 59 Newbie Poster

I would say no, because if you don't know how many times it will fire, you wont know if the current fire is the last.

paulkd 59 Newbie Poster

Let me know how you eventually become unstumped Bradley :-)

paulkd 59 Newbie Poster

Was the 9 seconds by design? I think the BBC only refreshes every 5 mins for sporting events.

paulkd 59 Newbie Poster

Start with adding lots of echos....

e.g. between line 3 and 4 add echo '1';
after your $_POST check line add echo '2';

if they don't show up add a die after them... echo '1';die;

if it doesn't show up check config.php

paulkd 59 Newbie Poster

This code is based on your original code - to replace lines 22-67.

<?php  
$currentSODate = '';
$displaySubTotal = FALSE;
$subTotal = 0;
$grandTotal = 0;
?>
    <table width="100%" align="center" cellpadding="4" cellspacing="1" class=tbl_table">
        <tr>
            <td class="tbl_header">SO Date</td>
            <td class="tbl_header">MV CODE</td>
            <td class="tbl_header">MV NAME</td>
            <td class="tbl_header">RATE</td>
            <td class="tbl_header">SUPP.QTY</td>
            <td class="tbl_header">AMT</td>
        </tr>
        <?php while($row = $stmt->fetch()): ?>
            <?php if($currentSODate!=$row['SODate']): ?>
                <?php if($displaySubTotal): ?>
                    <tr>
                        <td colspan="4">
                        <td><b>subtotal</b></td>
                        <td><b><?php echo number_format($subTotal,2); ?></b></td>
                    </tr>
                    <?php $grandTotal += $subTotal; ?>
                    <?php $subTotal = 0; ?>
                <?php else: ?>
                    <?php $displaySubTotal = TRUE; ?>
                <?php endif; ?>
                <?php $currentSODate = $row['SODate']; ?>
            <?php endif; ?>
            <tr>
                <td class="tbl_content"><?php echo date("d-m-Y", strtotime($row['SODate']));?></td>
                <td class="tbl_content"><?php echo $row['MVCode'];?></td>
                <td class="tbl_content"><?php echo $row['MVName'];?></td>
                <td class="tbl_content_right"><?php echo number_format($row['Rate'],2) ;?></td>
                <td class="tbl_content_right"><?php echo number_format($row['Qty']) ;?></td>
                <td class="tbl_content_right"><?php echo number_format($row['BalAmt'],2) ;?></td>
            </tr>
            <?php $subTotal += $row['BalAmt']; ?>
        <?php endwhile; ?>
        <?php $grandTotal += $subTotal; ?>
        <tr>
            <td colspan="4">
            <td><b>subtotal</b></td>
            <td><b><?php echo number_format($subTotal,2); ?></b></td>
        </tr>
        <tr>
            <td colspan="4">
            <td><b>grand total</b></td>
            <td><b><?php echo number_format($grandTotal,2); ?></b></td>
        </tr>
    </table>
   <?php unset($dbh); unset($stmt); ?>
paulkd 59 Newbie Poster

Can you post all your PHP code, but NOT your mysqli credentials.

paulkd 59 Newbie Poster

I'm looking closer at your code original and it's making less sense. Help me out.

Line 5 - you have ended your php block with ?> so how is line 7 going to work ?

paulkd 59 Newbie Poster

Are you running these operations manually, or is there some wrapper script doing the work for you ?

paulkd 59 Newbie Poster

Your appear to be missing a mysql_select_db()

paulkd 59 Newbie Poster

I've never used backbone, and just trying to get my head around it's concepts.. but the documentation appears to suggest that the .create will fire a "request"

Creating a model will cause an immediate "add" event to be triggered on the collection, a "request" event as the new model is sent to the server, as well as a....

I may be way off :-)

paulkd 59 Newbie Poster

A quick look at your screenshot would suggest that you are not truncating the table - simply running the script over and over. e.g. id numbers for Westville Jnr are in increments of 39.

paulkd 59 Newbie Poster

Sorry, I ran your code five times and every time was successful. The only thing that did error was your fclose - you need to change it to fclose($handle);

RoryGren commented: Thank you! +4
paulkd 59 Newbie Poster

Are you able to provide an attachment of real data, of perhaps fake data that also results in the duplicate records?

paulkd 59 Newbie Poster

or...... sometimes you can over-engineer things...

see if adding background:green; to the .steps class helps.

paulkd 59 Newbie Poster

wrapping it in .steps {} of course.

paulkd 59 Newbie Poster

Your bootstrap file currently has the class steps as:-

.steps {
  background-image: linear-gradient(bottom, rgb(69,139,0) 3%, rgb(102,205,0) 99%, rgb(117,171,234) 100%);
  background-image: -o-linear-gradient(bottom, rgb(69,139,0) 3%, rgb(102,205,0) 99%, rgb(117,171,234) 100%);
  background-image: -moz-linear-gradient(bottom, rgb(69,139,0) 3%, rgb(102,205,0) 99%, rgb(117,171,234) 100%);
  background-image: -webkit-linear-gradient(bottom, rgb(69,139,0) 3%, rgb(102,205,0) 99%, rgb(117,171,234) 100%);
  background-image: -ms-linear-gradient(bottom, rgb(69,139,0) 3%, rgb(102,205,0) 99%, rgb(117,171,234) 100%);
  background-image: -webkit-gradient(
    linear,
    left bottom,
    left top,
    color-stop(0.03, rgb(69,139,0)),
    color-stop(0.99, rgb(102,205,0)),
    color-stop(1, rgb(117,171,234))
  );
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 4px;
  color: #ffffff;
  height: 100px;
  margin-bottom: 10px;
  padding: 5px 10px;
}

so I would copy paste the -moz background image line....

background-image: -moz-linear-gradient(bottom, rgb(69,139,0) 3%, rgb(102,205,0) 99%, rgb(117,171,234) 100%);

....into the css generator by clicking the "import from css" button and paste it into the revealed text area, and click the "import" button.

The code will CSS code will be updated. If you hover over the CSS code a "copy" button appears which, when clicked, will copy the new CSS to the clipboard.

Paste the new code into a new CSS file and have this called after the bootstap.css file.

paulkd 59 Newbie Poster

OK, I cannot reproduce this on IE10 with developer tools @ IE9.

However, the gradients that your image has problems with appear to be classes feat-head and steps in bootstrap.css

Using this CSS3 generator tool you could import the mozilla gradient line and use the generated code for your classes.

I would suggest a temporary css file to override the bootstrap file.

paulkd 59 Newbie Poster

OK, here are my chrome and IE7 (IE10 with developer tools) screen shots. What am I not seeing?

paulkd 59 Newbie Poster

Hi showman13,

The div tags should not affect your table in any way.

You don't actually need div tags, simple H1->H6 and P tags should be sufficient for what you need (and your table).

The reason your H3 isn't naturally bold is that they have been set to "normal" in gen_css.css line 191.

paulkd 59 Newbie Poster

Without seeing the snippet of code that performs the POST "we" are unable to suggest where the issue lies.

paulkd 59 Newbie Poster

IDs can only appear once.

Your code references #messages (an id) and also .messages (a class) - which is it to be?

Your js results with the ajax call query string having SELECT=undefined

paulkd 59 Newbie Poster

If I were going to use tables for a quick layout they would have been for the 3 columns at the top, but you have used floated divs, then further down you appear to be using a table where simple divs or paras are called for.

I would start by ripping out the CSS styles e.g. <h3 class="B"> make it <h3>. Your style sheet has a lot of horrendous style names which thankfully you don't appear to be using.

paulkd 59 Newbie Poster

Is your developer back? It displays fine on my IE.

paulkd 59 Newbie Poster

Without looking at the js first things I see are 2 ids called "messages" each with display:inline.

paulkd 59 Newbie Poster

Hi,

I haven't thoroughly read this thread and the code, but just want to point out that you may need to click something in your email client to allow images to display.

paulkd 59 Newbie Poster

Remove all JavaScript.
Get a simple test form submission up and running.

paulkd 59 Newbie Poster

Another quick fix.....

I've made them appear in IE9+10 by floating the canvas

<canvas id="can" width="550" height="550" style="float:left"></canvas>

and removing the float from an anchor tag in main.css

#panel div#botones a {margin-right:10px; margin-top: 5px}

You might just want to try floating the container divs rather than the icons themselves, and maybe look at display:inline-block rather than float.

paulkd 59 Newbie Poster

Too woolly/generic.

First hit on Google "javascript os" SkyLight Project