i want to display my image from a folder but its not work what i change in code to work <?php $dir_path = "/xampp/htdocs/image/"; $extensions_array = array('jpg','png','jpeg'); if(is_dir($dir_path)) { $files = scandir($dir_path); for($i = 0; $i < count($files); $i++) { if($files[$i] !='.' && $files[$i] !='..') { // get file name echo "File Name -> $files[$i]<br>"; // get file extension $file = pathinfo($files[$i]); $extension = $file['extension']; echo "File Extension-> $extension<br>"; // check file extension if(in_array($extension, $extensions_array)) { // show image echo "<img src='$dir_path$files[$i]' style='width:100px;height:100px;'><br>"; } } } }

Member Avatar
Member Avatar
+0 forum 1

( https://i.stack.imgur.com/1LPVk.png ) i mention my link where output show when i press drop-down button then show empty fields but i have values in my sql table link ( https://i.stack.imgur.com/YEopy.png) but it does not execute my values in drop down list..i need help...when i show error it does not dispaly any error but show empty in dropdown list.. and my PHP code is: ` <tr> <td>Country Name</td> <td> <select name="name"> <?php $conn = oci_connect("username", "pswrd", "db"); $sql = 'SELECT name FROM country'; $stid = oci_parse($conn, $sql); $success = oci_execute($stid); while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS+OCI_ASSOC)) { echo "<option value=\"countryname1\">" . $row['name'] …

Member Avatar
Member Avatar
+0 forum 12

![year.png](/attachments/small/3/7e8a738796e0d938dcd6d9512b905f5f.png "align-right") first take a look at attachment pic to get a idea. I have two dropDownLists.1st dropDownList ID is cboPrev(oPrev) and 2nd dropDownList ID is cboNext(oNext). These both DropDownList will have the following 4 items (2014, 2015, 2016, 2017). User can click on dropdownlist and pick a year. # problem: # so for default item on dropDownList is "2014" but when user click on "2016" than the default first item is still "2014" - which is wrong # What I want: # So for default item on dropDownList is "2014" but when user click on "2016" than the default …

Member Avatar
Member Avatar
+0 forum 1

Hello, me again :) With this code: >>> from BeautifulSoup import BeautifulSoup >>> import urllib2 >>> url = urllib2.urlopen('http://www.python.org').read() >>> soup = BeautifulSoup(url) >>> links = soup('a') >>> print links A list of links printed into the terminal. I want to send the list into a text file, i tried this: >>> with open('python-links.txt.', 'w') as f: ... f.write(links) But there was an error: File "<stdin>", line 2, in <module> TypeError: expected a character buffer object What is the problem? How can fix that? -------------------------------------------------------------------- And one more question; as that list looks like this: (I will copy only small …

Member Avatar
Member Avatar
+0 forum 3

Hello Daniweb Community, I was just wondering if there is anyway possible to fix this? My damn cat sat on it a fall off taking the speaker with it. [Here are the pictures.](https://www.dropbox.com/sh/77tvrhmwdmk720p/AAAjzhP7LKgqMvYlQLCQZyRYa?dl=0)

Member Avatar
+0 forum 0

Hello, im trying to create a page that drag, drop and clone image on the drop plus dynamically add ids to the clones images. i sort of have it except the dynamic id part im not doing it right. $(document).ready(function(){ var cinemascreen = $("#cinema-screen"); var cinema = $("#cinema-wrapper"); var single = $(".single-chair"); var twin = $(".twin-chair"); var four = $(".four-chair"); cinemascreen.draggable({ containment: cinema, scroll: false }); single_chair = 0 $(".single-chair").draggable({ helper: "clone" }); $("#cinema-wrapper").droppable({ accept: ".single-chair", drop: function(event, ui) { $(this).append($(ui.draggable).clone()); var single_chair_id = "A" + single_chair; $("#cinema-wrapper .single-chair").attr('id', single_chair_id); $(single_chair_id).draggable({ containment: 'parent', }); single_chair ++; } }); }); page …

Member Avatar
+0 forum 0

Hi, I am trying to dynamically generate horizontal bars for my project. I would want to make these bars draggable, but I am not able to do so. Could you please tell me how this can be done using javascript/jquery. The code written so far is as follows: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>JS Bin</title> <style type="text/css"> canvas { border-bottom: thin solid; } </style> </head> <body> <p id='dothis'>Horizontal Bars</p> <canvas id='myCanvas' width='200px' height='300px' style='border:ipx solid #c3c3c3;'> </canvas> <form onsubmit='return false;'> <input type='text/javascript' id='duration'> <button onclick='input()'>input</button> </form> <script type='text/javascript'> var c = document.getElementById('myCanvas'); var ctx = c.getContext('2d'); ctx.fillStyle = '#FF0000'; …

Member Avatar
Member Avatar
+0 forum 1

Hi All, Having a few issues with some DB functions in my code at the moment. This code was developed by another user who kindly helped me out, and I know for sure it was working. The difference being that after having some compatability issues when upgrading to a new version of VS, I decided to create a new project from scratch and basically type the whole lot out again. Whilst this fixed the issues I was having previously, it seemed to introduce some issues on the DB side. As far as I can see (and my eyes are now …

Member Avatar
Member Avatar
+0 forum 12

Hello, I am using xampp for mysql: When I try to delete a database : "DROP DATABASE" statements are disabled. That statement appears. Why is it? What other alternative I could use? Thanks.

Member Avatar
Member Avatar
+0 forum 3

I am a new web designer of joomla . I can design a joomla site but not create a drop down menu . Pls any body help me. Thanks Faruk

Member Avatar
Member Avatar
+0 forum 1

This is the code for my third level drop down menu. <ul id="menu"> <li><a href="ourlovestory.php">Our Love Story</a></li> <li><a>Notes</a> <ul> <li><a href="blog.php">Blog</a></li> <li><a href="guestbook.php">Guestbook</a></li> <ul> <li><a href="guestbooksign.php">Sign our Guestbook</a></li> </ul> </ul> </li> </ul> What i want is the third level, Sign our Guestbook, be hidden then be displayed once hovered to Guestbook link. But my problem is that it is already displayed on the second level. ![a47a8f8d739ea29682ef434221109b0d](/attachments/small/2/a47a8f8d739ea29682ef434221109b0d.png "align-left") This is my CSS for this one. ul { font-family: 'tr_freehand591regular'; font-size: 18px; margin: 0px; padding: 0px; list-style: none; z-index:100; } ul li { display: block; position: relative; float: left; } li ul …

Member Avatar
Member Avatar
+0 forum 3

Hi! I've copied this drop down menu code from the web. It's working fine and the submenu's are displaying. However, when I place another div next to the first one. The submenus were hidden already. Could you help me? This is the header file. <div class="divMonogram" onmouseover="this.style.cursor='pointer';" onclick="window.open('index.php', target='_self');" align="left" > <div style="float:right; margin:135px 5px 0px 0px;"> <ul id="menu"> <li><a href="index.php">Home</a></li> <li><a>Our Big Day</a> <ul> <li><a href="thevenue.php">Venue</a></li> <li><a href="theevent.php">Program's Location</a></li> <li><a href="weddingparty1.php">Wedding Party</a></li> </ul> </li> <li><a>Notes</a> <ul> <li><a href="blog.php">Blog</a></li> <li><a href="guestbook.php">Guestbook</a></li> </ul> </li> <li><a>FAQ's</a> <ul> <li><a href="dresscode.php">Dress Code</a></li> <li><a href="guestsguidelines.php">Guest's Guidelines</a></li> </ul> </li> <li><a href="contactus.php">Contact Us</a></li> </ul> </div> </div> This …

Member Avatar
Member Avatar
+0 forum 2

hello Facebook or youtube is not showing the style sheets. My browser isn't showing drop down menu's or rollover buttons. They only show text as shown in the Picture it's all fine in other browsers, I am using waterfox. http://i1310.photobucket.com/albums/s656/mat1998x/Screenshot47_zps001bc803.png

Member Avatar
Member Avatar
+0 forum 1

i have the following tables in my database: CREATE TABLE `tblbrands` ( `brandid` tinyint(2) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(25) NOT NULL, PRIMARY KEY (`brandid`), UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8; CREATE TABLE `tblcars` ( `carid` smallint(5) unsigned NOT NULL AUTO_INCREMENT, `brandid` tinyint(2) unsigned NOT NULL, `typeid` tinyint(2) unsigned NOT NULL, `model` varchar(30) NOT NULL, `price` double(9,2) unsigned NOT NULL, `year` smallint(4) unsigned NOT NULL, `mileage` int(6) unsigned NOT NULL, `status` tinyint(1) unsigned NOT NULL, `description` text NOT NULL, `image` varchar(60) NOT NULL, `thumb` varchar(60) NOT NULL, `sideImage` varchar(60) NOT NULL, `rearImage` varchar(60) NOT NULL, `sideThumb` varchar(60) …

Member Avatar
Member Avatar
+0 forum 1

I would like to create my title image out of pure CSS3, but there is one feature that I'm not quite sure I can even do. Plus, the features that I know are possible don't seem to mix well. I don't know CSS very well, at least anything past the basics. I was hoping for some help. Gradient Text - i did this, and it works by itself. Drop Shadow - when combined, overrides gradient and i get a solid black shadow. Inner Bevel - ????? Is it possible to do all three things with CSS3 alone? I've googled and …

Member Avatar
Member Avatar
+0 forum 7

1. I am trying to use this code snippet, to learn how to create a dropdown menu, populated by a mysql database. 2. I have worked out the kinks of the database credentials. 3. I have created and populated a test database. 4. This does actually work, now that it is morning time and the sun is coming up already.. 5. I do get mostly a blank screen, but with a drop down menu (in the top left corner), with the 2 fields i inserted in my database shown.. So stoked there! 6. BUT! I receive the error @ the …

Member Avatar
Member Avatar
+0 forum 27

Hello there. Sorry that I don't really know much about drop down button in php. I was assign to do a booking system as my final project but somehow I don't know how to make the button works. It suppost to be like this. The user needs to choose which school he is going to book the locker. And after he has choosen, the numbers of lockers will be listed down and he can choose which one that he wants. But the problem here is, the value from drop down button seems like it can't pass the value from the …

Member Avatar
Member Avatar
+0 forum 12

<?php session_start(); include("connection.php"); $id=$_SESSION['id']; ?> <!DOCTYPE html> <html class="beautiful js " xml:lang="en" lang="en"> <head> <link href="120gb_files/index_packaged.css" media="screen" rel="stylesheet" type="text/css"> <title>mackbook_how to find</title> </head> <body> <form method="post"> <div class="box"> <div class="button"> <select id="screen_size" class="fancy" style="border:1px solid #ccc;" > <option selected="selected" value="">Screen Size</option> <?php $sql="select * from `mackbook`"; $result=mysql_query($sql); while($row=mysql_fetch_array($result)) { ?> <option data-id="965" value="<?php echo $row['screen_size'];?>"><?php echo $row['screen_size']; $_SESSION['size']=$row['screen_size']; ?></option> <?php }?> </select> </div> <div class="button" style="margin-top:50px;"> <select id="processor" class="fancy" style="border:1px solid #ccc;display:none"> <option selected="selected" value="">Processor</option> <?php $sql="select * from `mackbook`"; $result=mysql_query($sql); while($row=mysql_fetch_array($result)) { ?> <option data-id="970" value="<?php echo $row['processor']?>"><?php echo $row['processor']; $_SESSION['processor']=$row['processor']; ?></option> <?php }?> </select> </div> <div class="button" style="margin-top:50px;" …

Member Avatar
Member Avatar
+0 forum 3

i want that when i select value from 1st drop down box according to selected value values of 2nd drop down box changes and on selecting value from 2nd drop down values of 3rd drop down changed according to 2nd drop down selected value how can i achive this i know some javascript and jquery needed but i m new in javascript and jquery please some body help me out thanx in advanc

Member Avatar
Member Avatar
+0 forum 3

Hello all. I'm currrently working on a GUI that needs to support dragging some application-specific objects from a selection area onto a work area (JPanel). It's currently working in a "click where to place the object, then click the Add button" mode, but that's not good enough. The obvious approach is to use D&D (Java 6 or later) with a custom DataFlavor for the objects, but I'm struggling to find and decent documentation or examples of how to fit the whole thing together. The Oracle tutorials do a decent job of listing all the classs and methods involved, but not …

Member Avatar
Member Avatar
+2 forum 7

Heloo everyone. I have this code for a form in PHP...but when I use $POST['collection'] or any other from th drop down lists I cannot access the vaalue of the variable passed: <form enctype="multipart/form-data" action="insert_validation.php" method="post"> <table border="0"> <tr><th>Choose category: <tr><td><select name="category"> <?php $sql=mysql_query('SELECT category from Category order by category'); $numRows = mysql_num_rows($sql); for ($i = 1; $i <= $numRows; $i++) { $crtRow = mysql_fetch_array($sql); $idCat = $crtRow["idCategory"]; $cat = $crtRow["category"]; print("<option value=\"$idCat\">$cat</option>"); } ?> </select> <tr><th>Choose collection: <tr><td><select name="collection"> <?php $sql=mysql_query('SELECT collection from collection order by collection'); $numRows = mysql_num_rows($sql); for ($i = 1; $i <= $numRows; $i++) { …

Member Avatar
Member Avatar
+0 forum 20

i have a form with a text box and a drop-down list. the form submits to itself. when the user submits the form for processing the form must be able to retain the selected value from the drop list if there is an error. here is the code for the form <?php session_start(); // start a session require_once 'includes/db_connect.php'; $page_title = 'Add New Bank Branch'; require_once 'includes/header.php'; require_once 'includes/db_connect.php'; require_once 'includes/functions.php'; if ( isset( $_POST['submitted'] ) ) { $errors = array(); if ( $_POST['bankID'] == "" ) { $errors[] = 'Please select the bank to which the branch belongs.'; } …

Member Avatar
Member Avatar
+0 forum 5

Hey guys I have a page where a user can drag and drop ellements into divs 's and everything works great, but I need the div to only accept 1 element. Check it out [Click Here](http://www.cintascsr.com/test_site/report/) Right now you can drag both pdf docs into one "send to print" div. I need to able to either kick out the existing one or not allow the second ellement to be dropped at all. Any ideas??

Member Avatar
Member Avatar
+0 forum 8

hi guys, got this code from this previous thread: http://www.daniweb.com/web-deveelopment/javascript-dhtml-ajax/threads/416185/adding-rows-to-table-per-click-manipulating-name-field-thereby the code works fine but how do i modify the code so I will be able to get all the drop down data selected by the user? let's say there were 5 drop downs that were created and selected how to get all those data? here's the code from that link above: <html> <head> <title>Adding rows</title> <SCRIPT language="javascript"> function addRowEntry(tableID){ var table = document.getElementById(tableID); var rowCount = table.rows.length; // create a row element var row = document.createElement("tr"); // add the row to the table table.appendChild(row); var colCount = table.rows[0].cells.length; for(var …

Member Avatar
Member Avatar
+0 forum 2

I would like to know the best way to manage the two drop down menu on the PHP page. 1st menu : Select Type of House (House1, House2, ) 2nd menu : Select Number of Rooms (1,2 .. 12) The system should be displayed price based on selected items. Need your suggestion for manage this system in order to make it easier for future use.

Member Avatar
Member Avatar
+0 forum 4

I am having trouble with the dropdown I am working on. I'm trying to add the dropdown, and changed up all the code that I used for the original navigation. The problem is, the rollover state, which shows a background color, is doubled in height. My goal is to have the dropdown hover state background only be as wide as the text link, not all of them be one width. The problem can be seen at [Click Here](http://mgndesign.com/services/) This is my first time experimenting with a drop down menu using css, any pointers or help is greatly appreciated!

Member Avatar
Member Avatar
+0 forum 4

Hi all I need to be able to drag and drop multiple files from Outlook into my vb.net application. Using e.data.GetData("FileGroupDescriptor") I can read using an IO.Stream the FileGroupDescriptor and detect the names of the files being dropped. If I then use e.data.GetData("FileContents") using a IO.MemoryStream I can detecty the length of the file contents and then copy the contents of the first file from memory into a file. This works fine for the first file but I can't get to the FileContents of files 2,3,4 etc etc. Is there a mechanism for accessing the index of the FileContents and …

Member Avatar
Member Avatar
+0 forum 3

Greetings... I am a new member to DaniWeb. My Wife's system began its current symptoms about a week ago 08-10-2012. First sporadically, then seemed to escalate exponentially until 08-12-2012 when she could no longer: 1. double-click on her icons in... (we must right-click and choose OPEN) a. the START menu b. desktop c. Quick Launch (which disappears after each reboot after we have clicked to have it display) 2. We could no longer move icons on the desktop to another location until I ran a. regsvr32 ole32.dll and b. regsvr32 /i shell32.dll c. It solved the problem of icon movement, …

Member Avatar
Member Avatar
+0 forum 48

Hi All, Ever tried to make a change to a SQL database table only to get a message telling you it is unable to carry out the change as it would have to drop and recreate the table? This is one of these things that you encounter once, correct and then forget about. I encountered it today on a new database server I had set up so I thought I'd post the solution here. Basically Microsoft decided in their wisdom to by default not allow users to carry out changes to tables that would involve the table being droppped then …

Member Avatar
Member Avatar
+1 forum 1

Hi I am busy building a small Python app in which I have two tkinter (ttk) Treeview widgets. I want to be able to drag an item (or multiple selected items) from the one treeview to the other, having the dragged items added to the treeview where they are dropped. At the moment I cannot find any demo code of how to do this. Is there a straight forward way of achieving this? Many thanks in advance.

Member Avatar
+0 forum 0

The End.