...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](http://malsup.com/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 …

Member Avatar
Member Avatar
+1 forum 8

--Hi DaniWeb. I have been doying bulk data Uploads from Excel Sheet to MySql data base and hence thought that I may need the reverse of this process and so Export MySql Tables into Excel Format for Backup purposes (I also will be happy for a better suggestion for a better data backup solution if is any from this like saving them in .sql readable format and ready for upload Programatically as the way is there if I go to Php Myadmin). For now I just wanted to have something of the sort as I alredy have a mechanism for …

Member Avatar
Member Avatar
+1 forum 4

I've been looking tutorials and examples of setting the value field of a input tag. I'm trying to enter two IP addresses into the text fields on [this](https://www.ipaddressguide.com/cidr) website, under IP Range To CIDR. But my code won't enter anything. There's no ID tag, so I can't use the getElementById method. ![Inspect.PNG](/attachments/large/3/bf0f61148c19288f410be68448d613f5.PNG) Dim url As String Sub ConvertIPRangeToCIDR() Dim IE As InternetExplorer Set IE = New InternetExplorerMedium With IE .Visible = True url = "https://www.ipaddressguide.com/cidr" .navigate (url) While IE.Busy DoEvents Wend Dim Elements As Object Set Elements = IE.Document.getElementsByTagName("input") For Each Element In Elements If Element.Name = "ipFrom" Then Element.Value …

Member Avatar
Member Avatar
+0 forum 1

Hi, I have to pass string entered in the input text to server method calling through jquery ajax. But its not going through. can please somebody tell me what i m doing wrong here. Below is the code: [CODE]$.ajaxSetup({ cache: false //timeout: 1000000 }); function concatObject(obj) { strArray = []; //new Array for (prop in obj) { strArray.push(prop + " value :" + obj[prop]); } return strArray.join(); } //var Eid = "stephen.gilroy1"; function testCAll() { //var ntid = $('#Eid').val(); $.ajax({ type: "POST", url: "Testing.aspx/SendMessage", //data: "{'ntid':'stephen.gilroy1'}", //working data: "{'ntid': $('#Eid').val()}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(result) { alert(result.d); resultData …

Member Avatar
Member Avatar
+0 forum 5

Write a PHP code to: 1- Create a 2-dimensional array, with a random number of rows and columns. 2- Fill the array with random numbers. 3- Send the array to a function that returns the number of the highest frequency in the array. Who can help me to solve it?

Member Avatar
Member Avatar
+0 forum 4

Hello webmasters, I have a website about memes and I want to update the database each time the user scrolls down. I have no problem when I make a few requests to the database, but what if I want to do a lot of requests in a large database? I recently had to refactor my code to exclude some code that is important just for the sake of performance. Is there any way around it? How does Facebook do it?

Member Avatar
Member Avatar
+0 forum 3

hi, i have installed XAMPP, but i would like to run my localhost from another computer..

Member Avatar
Member Avatar
+3 forum 14

Hi All, I am building an eCommerce website and I really new to PHP and MYSQL but loving the challenge. On my website I have 9 different categories of products with each page having about 8 items to sell. Rather than duplicating the code from each .php/.html file into a new file and change the SQL query, is it possible to write a script that says when the user clicks on category1 in the navigation bar, show all the products in category1? Hope this makes sense. Thanks in advanced.

Member Avatar
Member Avatar
+2 forum 6

A developer from India helped me create a pretty cool page, but he's since abadoned me with a few errors in his code. On my [ROSTERS](https://fiftyallstars.com/p/rosters.html) page for my basketball program, it's meant to display cells generated from [this Google Spreadsheet](https://docs.google.com/spreadsheets/d/e/2PACX-1vQd232Tmdvi3iaqni-Gc_RR0d0he9k2Dkel5A7uJU-GWUdck4CFecru3K2HfrybyI3pfrpAMpM4XZOa/pubhtml). Only problem is it works for most grades, but 1st-8th aren't correctly referencing the right columns. I don't know a ton about code, but everything looks like it matches up on the site. **These lines, for instance, are a part of the HTML that should display my spreadsheet's CENTRAL tab columns BG-BK** <li><a href="javascript:void(0)" target="_blank"><span style="float:left; color:#999999;">15 | <span …

Member Avatar
Member Avatar
+2 forum 5

inside mysql db which is table employe in coloumn *id_employee*, some data have a leading zero, etc : **id_employee : 0378192918 empy_name : Daniweb** i need to get id_employee for delete employe in my aplication, then i using ajax method like this : if(id) { alert(id); $("#deleteBtn").unbind('click').bind('click',function(){ $.ajax({ url: 'pegawai/delpeg.php', type:'post', data: {emp_id : id}, datatype: 'json', success:function(response) { return value is **378192918**, the first number **0** not showing in alert box. why ? then how to get entire value id_employe from db ?

Member Avatar
Member Avatar
+0 forum 8

I have an annoying problem on my website, I have been struggling for a few days to fix it and I can not do it at all. On my site here https://codurilevietii-888.ro/ each time i load a new page, the scroll position stays same as it was on the previous page. I want to force reset the scroll position (top) each time page is reloaded. This problem happen only on mobile sizes (responsive thing). Does anybody know some code, html/css to force the page to load at the top each time it is refreshed? Would really appreciate that. I’m a …

Member Avatar
Member Avatar
+0 forum 4

Am trying to draw three circles on the page but nothing shows up, anyone can tell me what is wrong here? <body> <canvas id="myCircle(3)" width="60" height="60"> Your browser does not support JavaScript, please update it before you continue</canvas> <script type="text/javascript"> function myCircle(myCircle) { var c = document.getElementById("myCircle"); var ctx = c.getContext("2d"); ctx.beginPath(); ctx.arc(30, 30, 26, 0, 2 * Math.PI); ctx.stroke(); return myCircle; } </script> </body> Thank you :)

Member Avatar
Member Avatar
+0 forum 10

I'm working in Excel to extract content of a table from a web page and populate Excel sheet cells with it. I'm trying to extract data from a table that gets loaded to a web page after show results method gets called. I have an error that says "Run-time error '424' Object required". Sub extractDataFromTable() Dim IE As Object Dim theTable As Object Dim form As Variant, button As Variant Dim doc As Object Set IE = CreateObject("InternetExplorer.Application") ' navigate to a web page With IE .Visible = True .navigate ("http://www.sizemyups.com") End With While IE.ReadyState <> 4 DoEvents Wend Set …

Member Avatar
Member Avatar
+0 forum 10

I want to add a Facebook share button on my website. But I don't want the new window pop up dialog. I want the dialog that opens on the website, just like Facebook has. I want to accomplish this: ![2014-01-21_19_35_19-Feed_and_Share_Dialog.png](/attachments/large/4/2acecb3250119e0bcf8b8182039b2937.png) Instead of this: ![ajXTj.png](/attachments/large/4/953a8938d10c281edf5a7551f29adf65.png) Can anyone point to me a resource?

Member Avatar
Member Avatar
+1 forum 4

I have installed Facebook share button on my website but it won't work on new content. It works perfect with content that is loaded with PHP but not content appended by AJAX. Can anyone help?

Member Avatar
Member Avatar
+0 forum 1

I have some simple scripts like blogs, forums, and so on. They are not of high quality but I want to sell them. The problem is that I cannot build a professonal website. But I want to sell my work. Where can I find a marketplace for such items? Note that I can't sell with Themeforest because they have a strict moderation.

Member Avatar
Member Avatar
+0 forum 1

I am working on an image cropper. And I am on the first stages. I want to know how to create the the two divs over the image, one is transperent while the other acts as a mask. Can this be done with CSS? Or should I consider jQuery? This is what I want to accomplish ... ![Croppr_js.png](/attachments/large/4/5d86601b7d949d7e68afe7357beafc5d.png) I just want to know how to create this overlay image feature.

Member Avatar
Member Avatar
+0 forum 10

Hi, I have a problem with retrieving uploaded images from a database. It appears to upload fine, but when i try to display the image i get loads of binary jargon? I have tried looking everywhere for a solution, but unable to, any help would be greatly appreciated. The code for uploading is [code] include ("database.php"); if(isset($_POST['Submit'])) { if(isset($_FILES['image'])) { /* Upload file from anywhere and put in a set temp dir */ $image = file_get_contents($_FILES['image']['tmp_name']); $image = mysql_real_escape_string($image); $handle = fopen($image, 'rb'); // read binary $contents = fread ($handle, filesize ($image)); //$contents = addslashes($contents); fclose ($handle); $description = $_POST['description']; …

Member Avatar
Member Avatar
+0 forum 13

I m working on a MLM project in which i have to store member automatically in binary tree form like 1 is root 2 is child of 1 3 is child of 1 Then 4 is child of 2 5 is child of 2 6 is child of 3 7 is child of 3 then 8 is child of 4 and so on ...... I Want to Create a Downline in above Structure. Please Help me. can any body help me

Member Avatar
Member Avatar
+1 forum 81

The facts: We are talking about a small company (5 persons) with many clients that making real money (we don't) . We provide our own software that has unique features against the e-commerce completion. The problem: the first glimpse of the problem arose around 2012 and made clear around 2014 with web sockets. Some clients didn't want a simple chat with their client but instead a full live eShop where they could negotiate the prices of a product or even start a discussion with a visitor. The solution would be implementing web sockets in to our framework and that worked …

Member Avatar
Member Avatar
+1 forum 7

I'm somewhat new to coding websites. I'm trying to have a code where it pulls multiple images from a single database and displays it in a grid, not a table. At the top of my page I have a normal connection to the database. (very sorry about not having a code snippet, I'm new to daniweb and keep having errors when trying to use code snippets.) <div id="grid" class="grid-container"> <?php while ($row = mysqli_fetch_array($query)) echo '<div class="grid-item"> <p>'.$row['images'].'</p> <p>'.$row['project'].'</p> <p>'.$row['summary'].'</p> </div>'; ?> </div>

Member Avatar
Member Avatar
+0 forum 1

Hi All, As part of a university project I need to create a website that sells cosmetic products. The customer will need to go through the motions of selecting the items, placing them into a basket and going through the checkout process. However I wouldnt need to use a card merchant to process the transaction. customers would also need to sign up and create an online account. I have created simple websites before, with HTML and CSS, but thats it. What development langauges would I need to know other than the two above? I assume PHP and Javascript will be …

Member Avatar
Member Avatar
+1 forum 4

As Google+ is being deprecated, I need to migrate my Oauth 2 off of Google+ and into the Google Sign-In authentication system. So far, I changed the list of scopes from `https://www.googleapis.com/auth/plus.login email` to `profile email`. However, I'm struggling trying to find in Google's docs what to change the endpoint `https://www.googleapis.com/plus/v1/people/me` to. I'm trying to figure out the URL for the endpoint that retrieves the logged in user's public profile and email address. The [Quick migration guide](https://developers.google.com/identity/sign-in/web/quick-migration-guide) doesn't seem to be very helpful unless you're using their client library (which I'm not). Their guide at https://developers.google.com/identity/protocols/OAuth2 also doesn't seem to …

Member Avatar
Member Avatar
+0 forum 1

Hi i am trying to view my blog or post in detail description at that time my browser title shows %page_title%, But it has to show my blog or post title in that place. please help me to solve this issue. **My permalink settings as below** /%category%/%postname%/ **Note:** i have attached a screen below for reference. ![blog_title_LI.jpg](/attachments/large/3/27c5c942f9f63247e0b06405f4108a36.jpg) Word

Member Avatar
Member Avatar
+0 forum 1

Hello i have a mysql statement and i want to add more parameters to get different results. SELECT DISTINCT M.message,F.friend_one,F.friend_two, F.role,U.uid,U.username FROM users U,friends F, messages M WHERE ( U.status='1' AND F.friend_one = '88') OR (F.friend_two='88' ) AND F.role='friend' 88 is the users id so i want to show M.message from friends of 88 but not 88 itself hints: when one is becoming friend with other friend_one is 88 -for example- and friend_two another user id or vice versa M table has id of user as a column of course

Member Avatar
Member Avatar
+0 forum 4

I realize that this question has been asked many times, but I've yet to find a flatfile version. I'm looking for a way to achieve this: **Scenario:** A person submits their email address via a form. The email is then stored in flatfile database (.txt) The person then gets an auto-reply email with a link to confirm their email address. Upon confirming after clicking the link, their email address is saved to a new file confirmed_emails.txt for example. Is this possible without the use of a SQL/similar datase, and how can I achieve this? Note: SQL or other database option, …

Member Avatar
Member Avatar
+0 forum 11

Hello Daniweb Community, I have been talking on a couple [Facebook](http://www.facebook.com) groups such as sale pages where you post your own stuff for people to buy. Most groups like this have rules about bumping like once per day, every 12 hours etc... So it got to the point where it became annoying to have to bump my posts every so oftern so I managed to construct this script that'll do it automatically with the help of a cronjob that can be set to bump at whatever time you like. So I have made a simple easy to use (ha may …

Member Avatar
Member Avatar
+3 forum 29

**HELLO GUYS!** I'm Sergey Romanenko a web-developer with strong will for learning and researching new technologies and architectural solutions. I like creating and using specialised tools for making development processes as efficient as possible. Let me introduce my pet project - Flextype! Flextype is Open Source, fast and flexible file-based Content Management System. That's Easy to install, upgrade and use. Flextype provides amazing API's for plugins, themes and core developers! **FEATURES** Simple Easy to install, upgrade and use. No installation needed, just copy files to your server! Fast Flextype is realy fast and lightweight! No database required, flat files only! …

Member Avatar
+1 forum 0

Hello, Recently I am using phpexcel and afer many tries I wasn't able to find out how to make a document with a image in its header. Here is a simplified code that I am using. Can someone helps me with this issue?! <?php require_once 'PHPExcel.php'; $objPHPExcel = new PHPExcel(); $objDrawing = new PHPExcel_Worksheet_HeaderFooterDrawing(); $objDrawing->setPath('header.jpg'); $objPHPExcel->getActiveSheet()->getHeaderFooter()->addImage($objDrawing, PHPExcel_Worksheet_HeaderFooter::IMAGE_HEADER_RIGHT); $objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddHeader("&C&G"); $objPHPExcel->setActiveSheetIndex(0)->setCellValueExplicit('A1', 'CODICE PRATICA'); $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); $objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel); $objWriter->save('test.xlsx'); ?>

Member Avatar
Member Avatar
+0 forum 3

hi all, I am new to Codeigniter, start learning because of one of our customer want the conversion of their some Oracle Forms to web app and I found it is much easier to use CI framework of PHP but one thing I can't connect / work with their Oracle database 12c Release 2. I have a VM with Win 8, Oracle DB 12c and WAMP ( latest downloaded on 10-Nov-2018 ). I searched for it and found various solution (not any of 12c), tried some but still I failed to even load data from a table. can somebody help …

Member Avatar
Member Avatar
+1 forum 6

The End.