paulkd 59 Newbie Poster

So $ar is manually created by you? Not from the database?

paulkd 59 Newbie Poster

Try something like:-

#footer {
  font: italic normal 12pt Cambria;
  background: transparent;
  text-shadow: 1px 1px #fff;
  color: #535353;
  position: fixed;
  bottom: 0;
  left: 0;
  height: 40px;
  width: 100%;
  z-index: 999;
 }
paulkd 59 Newbie Poster

Is it the <a class="article-top" /> that you will be targeting?

paulkd 59 Newbie Poster

Which key from your print_r dump contains the value 12 ?

paulkd 59 Newbie Poster

Can you show the HTML form code?

paulkd 59 Newbie Poster

I'm having trouble matching the data from your array examples to the print_r data dump you supplied. e.g. in the example where you displayed

Array ( "City", 12, 29,"Y", "City_date", "City_Total" ),
$d = "2013-02-15";
$a = "126.03";

I can match this in the print_r dump

but in your last post I cannot match

Hence the Array ( "City", 12, 29,"Y", "City_date", "City_Total" ), becomes
Array ( "City", 12, 29,"Y", 6, 16),

to the print_r dump.

Are you using actual figures or just providing example figures?

paulkd 59 Newbie Poster

In the array you mention there are actually 120 keys.
You say your database table (bills) has 60 fields and the result of select * from bills somehow results in the array.

There is some code somewhere inbetween your SQL and the array. Without this, and more details about what you actually require ("to describe the columns in a report") I'm stuck.

paulkd 59 Newbie Poster

I don't have the technical words, but you essentially use a parent/container as an event handler container (what?). I've set up a jsFiddle to demo. Hope it helps.

jsFiddle

paulkd 59 Newbie Poster

OK, how about posting the bills table schema?

I've used ColdFusion since version 4.0 - remember those pcode errors?

paulkd 59 Newbie Poster

Can you post your working ColdFusion code? CF is my first language :D

paulkd 59 Newbie Poster

HTML5 to allow target _blank

Still no need for JavsScript. I think you can simply wrap your div in hyperlink tag

<a href="http://www.google.com" target="_blank">
<div class="box">
    <p>Your content goes here....</p>
</div>
</a>
paulkd 59 Newbie Poster

Could you post the lines that produce the array?

paulkd 59 Newbie Poster

after this line (27) $sql="SELECT id FROM admin WHERE username='$username' and passcode= ' $md5pass '";

add die($sql); and compare with what's in your database field.

paulkd 59 Newbie Poster

Something like this?

$arr['City_date'] = 'result';
$ar = array("City", 12, 29, "Y", "City_date", "City_Total");
echo $arr[$ar[4]];
paulkd 59 Newbie Poster

Which type of PayPal payment are you using?

paulkd 59 Newbie Poster

Hi Jack,

You're not explaining your problem too well. Looking at the code you have provided there are is no "content", just strings in arrays, which, syntax errors aside, display as expected.

paulkd 59 Newbie Poster
<html>
<head>
<script type="text/javascript">
alert("hi");
</script>
</head>
<body>
.........
......
....
</body>
</html>
paulkd 59 Newbie Poster

You don't actually say what your problem is - are you looking for SQL code or do you have an error message?

switch($id) {
    case: 5 :
        header('location: /personal.php');die;
        break;
    case 35 :
        header('location: /admins.php');die;
        break
    }
}
paulkd 59 Newbie Poster

I've never done this before and probably never will.

Have a look at this article on Wikipedia

paulkd 59 Newbie Poster

Your href value is incorrect, it should start http://

You don't need the JS to open a new window the (deprecated) target atrribute should take care of that for you.

paulkd 59 Newbie Poster

So not publicly available to view then? ;-)

paulkd 59 Newbie Poster

Not sure why you have two solutions. I would simply use (untested).
I assume that this is inside <script> tags, inside a php file?

 reloadResponses();

 function reloadResponses()
 {
    $('#responses').load('pages/community/load-responses.php?id=<?php echo $id;?>');
    setTimeout(reloadResponses,10000);
 }
paulkd 59 Newbie Poster

i have somekind of control panel

I think it might be best if you raised a support ticket with your host.

paulkd 59 Newbie Poster

Where on your website is the actual file stored?

e.g. http: //www.mywebsite.com/assets/images/avatar.jpg

paulkd 59 Newbie Poster

I haven't used raw XMLHttpRequest in a while - just so easy with jQuery. However, from what I remember don't you have to check ready states? I think maybe that your return is firing before you have actually caught a response. Your alert simply stops time allowing you to catch a response.

I could, and probably am, completely way off though :D

paulkd 59 Newbie Poster

Hi,

The page you reference uses bootstrap, which uses the following css for your effect.

input:focus:invalid:focus, textarea:focus:invalid:focus, select:focus:invalid:focus {
    border-color: #E9322D;
    box-shadow: 0 0 6px #F8B9B7;
}

I'd never seen the :invalid attribute, so I googled and found this link.

paulkd 59 Newbie Poster

Can you show us your assigning code?

paulkd 59 Newbie Poster

Can we view the page?

paulkd 59 Newbie Poster

Thanks JorgeM.

paulkd 59 Newbie Poster

Just noticed the incorrect position of the style block. shhh.

paulkd 59 Newbie Poster

Just came across my first daniweb google hit.

Searched on "Coldfusion wamp" past year. 8th link on page.

paulkd 59 Newbie Poster

Sorry M/ you misunderstand. I messed up on daniweb, my attached image didn't render as anticipated amongst other things.

<M/> commented: oh, now i understand +0
paulkd 59 Newbie Poster

If I understand correctly, you are populating a select based on the value chosen from a previous select. When all 3 options are chosen you want the value of the first select and the index (rather than value) of the options chosen for the remaining selects to be submitted.

You could use a hidden form field <input name="idlist" type="hidden" value=""> which will be updated by JavaScript (jQuery) as each option is chosen. e.g. <input name="idlist" type="hidden" value="155,3,2>

paulkd 59 Newbie Poster

Method 1 Bootstrap 3.
Lose the first and last column and work with 5 columns of 2 units.

<div class="container">
    <div class="row">
        <div class="col-md-2 col-md-offset-1">Box 1</div>
        <div class="col-md-2">Box 2</div>
        <div class="col-md-2">Box 3</div>
        <div class="col-md-2">Box 4</div>
        <div class="col-md-2">Box 5</div>
    </div>
</div>
paulkd 59 Newbie Poster

I've just posted a code snippet, but it didn't go as well as I would have liked.

Is there a "test" posting area in which to "play" ? :D

paulkd 59 Newbie Poster

File Structure

paulkd 59 Newbie Poster

...was asked for some php file upload code, so I thought I would post some stripped down, barebones code that I use in admin/dashboard pages to add/change images associated with products.

Please see attached image for folder setup.

The code uses the jQuery Form plugin by Mike Alsup.

index.php has two forms; one for the image uploads and the other to show where you would have your "product add/update" form. Files are immediately uploaded to a tmp directory whenever you select an image. If you change your mind a few times you can end up with lots of images in your tmp folder, so there is a small routine to empty the tmp folder whenevery index.php is called.

<?php
//remove old tmp files
$tmpImageFolder = $_SERVER['DOCUMENT_ROOT'].'/assets/images/tmp';
$files = glob($tmpImageFolder.'/*.*');
if ($files){
    foreach($files as $filename){
        unlink($filename);
    }
}
?>
<!DOCTYPE html>
<html>
<head>
    <title>Upload File Demo</title>
    <style>
    /* hide the browse button */
    #input-file {
      display:block;
      height:0;
      width:0;
    }
   </style>
</head>
<body>
    <p><img id="display-image" src="/assets/images/placeholder.jpg"></p>
    <form id="upload" action="/ajax/uploadfile.php" method="post" enctype="multipart/form-data">
        <input id="input-file" name="file" type="file" value="" />
    </form>
    <p><button id="choose-photo" type="button">Choose Photo</button></p>

    <!-- the product form handler can be ajax or standard post -->
    <form id="product-update">
        <!-- use a hidden field to send over new filename. hidden field is updated via the js uploadFile() function -->
        <input id="product-newfilename" type="hidden" value="">
        <!-- Your actual product form data goes here -->
    </form>

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script src="/assets/js/jquery.form.min.js"></script>
    <script src="/assets/js/uploadform.js"></script>
</body>
</html>

CSS is used to remove the ugly "browse" input type="file" control …

paulkd 59 Newbie Poster

I don't think you need to loop. I haven't had time to test but this page looks like you could adapt JorgeM's code and simply select the textboxes.

http://css-tricks.com/useful-nth-child-recipies/

paulkd 59 Newbie Poster

Why don't you review the js function the page is calling.

https://www.barnardos.org.uk/nom-forms-init.js

paulkd 59 Newbie Poster

Your update column NAP_TO has an alias reference of cel (cel.nidt) but your table is not aliased this way.

paulkd 59 Newbie Poster

Just curious as to why you are using jQuery and then use raw JavaScript for the DOM?

paulkd 59 Newbie Poster

is your update table named

LTE_noria_cellulecel_bk_up

or

LTE_noria_cellule

?

paulkd 59 Newbie Poster

Your first code block appears not to have been copy/pasted correctly. There is an end comment block which errors.

Please add the following line

echo $site->ur().'<br>'.$site->get_param('zone_bde').'<br><br>';

above the first $sql block that is not working and then copy paste the actual (not working) block.

and then die($sql); after the $sql block.

paulkd 59 Newbie Poster

What is displayed when you die($sql); ?

paulkd 59 Newbie Poster

Yes. I presume that you are posting a form to populate and then send the email? and after the email is sent (database updated etc..) take the user back to a "Thank you" page?

You need to use JavaScript (with jQuery preferred) to place your animation on screen when the submit button is clicked (after successful form validation, of course).

I've used this simple modal plugin in the past

paulkd 59 Newbie Poster

It's using html5 and the placeholder attribute.
If you view in IE7 you wont see the effect.

paulkd 59 Newbie Poster

JSON is a data storage format. JavaScript is a scripting/programming language.

The website explains it better but the format is "readable" and lightweight.

Your text shows that content.txt will contain JSON encoded data. You can use whatever server (PHP, ColdFusion..) or client (JavaScript..) language to read the data and reformat to the language's array type.

paulkd 59 Newbie Poster

Your footer is working correctly.
You need to use <table align="center"> to centrally align a table.
If you add a <p>Hello World</p> in your footer you should see it in the middle.

paulkd 59 Newbie Poster

Here is some code I use. Just added the rmdir for you, I don't actually remove the directory. As you can see in good developer style I intend to use iterators some time in the future ;)

//removed unwanted photos
$tmpPhotoDir = DRB.'/photos/';

//todo: use iterator
$dir = glob($tmpPhotoDir.'*.jpg');
if ($dir){
    foreach($dir as $fileName){
        unlink($fileName);
    }
}
rmdir($tmpPhotoDir);

Found a stackoverflow link for your exists question

You should know how to echo ;)

paulkd 59 Newbie Poster

Yes you are doing it wrong.
You are calling $conn like a class but you have not declared a class in your connect.php file.

You should google for beginners php oop.

Here's an oop mysqli link