So $ar is manually created by you? Not from the database?
paulkd 59 Newbie Poster
paulkd 59 Newbie Poster
paulkd 59 Newbie Poster
paulkd 59 Newbie Poster
So $ar is manually created by you? Not from the database?
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;
}
Is it the <a class="article-top" />
that you will be targeting?
Which key from your print_r dump contains the value 12 ?
Can you show the HTML form code?
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?
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.
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.
OK, how about posting the bills table schema?
I've used ColdFusion since version 4.0 - remember those pcode errors?
Can you post your working ColdFusion code? CF is my first language :D
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>
Could you post the lines that produce the array?
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.
Something like this?
$arr['City_date'] = 'result';
$ar = array("City", 12, 29, "Y", "City_date", "City_Total");
echo $arr[$ar[4]];
Which type of PayPal payment are you using?
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.
<html>
<head>
<script type="text/javascript">
alert("hi");
</script>
</head>
<body>
.........
......
....
</body>
</html>
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
}
}
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.
So not publicly available to view then? ;-)
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);
}
i have somekind of control panel
I think it might be best if you raised a support ticket with your host.
Where on your website is the actual file stored?
e.g. http: //www.mywebsite.com/assets/images/avatar.jpg
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
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.
Can you show us your assigning code?
Can we view the page?
Thanks JorgeM.
Just noticed the incorrect position of the style block. shhh.
Just came across my first daniweb google hit.
Searched on "Coldfusion wamp" past year. 8th link on page.
Sorry M/ you misunderstand. I messed up on daniweb, my attached image didn't render as anticipated amongst other things.
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>
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>
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
File Structure
...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 …
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.
Why don't you review the js function the page is calling.
Your update column NAP_TO has an alias reference of cel (cel.nidt) but your table is not aliased this way.
Just curious as to why you are using jQuery and then use raw JavaScript for the DOM?
is your update table named
LTE_noria_cellulecel_bk_up
or
LTE_noria_cellule
?
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.
What is displayed when you die($sql);
?
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
It's using html5 and the placeholder attribute.
If you view in IE7 you wont see the effect.
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.
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.
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 ;)
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