52,566 Archived Topics
Remove Filter ![]() | |
I just thought I'd share this because it took me a bit of time to figure out tonight. When members post content with MS Word quotes, etc., and they look funky on our UTF-8 websites, it's because those characters need to be converted to UTF-8. This bit of code worked … Web Development php | |
Google has been quick to blacklist domains implicated, most often unwittingly, in the distribution of what has become known as the SoakSoak malware campaign courtesy of soaksoak.ru being the first domain in the redirection path it used. With 11,000 domains blocked over the weekend, you might be forgiven for thinking … Web Development cybersecurity php seo virus-malware wordpress | |
When using emails as usernames you want them to be unique over your table, but this can be a problem if you consider a GMail account, because of their [username](https://support.google.com/mail/answer/12096?hl=en) [policy](https://support.google.com/mail/answer/10313?hl=en). They allow: * dots * digits * letters * plus addressing text by using the `+` sign, i.e. `orange+juice@gmail.com` … | |
![]() | Hi all. Been playing with some autoloading but couldn't get it to work. I'm trying to implement the PSR-4 (project scope) approach, but documentation is sketchy and I'm a bit lost as to the issue. I've read the PHP-Fig docs: http://www.php-fig.org/psr/psr-4/ and an trying to implement a script from the … ![]() |
Hello! So, I see you need help... or maybe you just fancy a nice little read. Either way, this is here for a reason. When you post code on DaniWeb, it can be frustrating waiting for a reply (trust me, I've been there!) — so... here are some tips that … Web Development php | |
A report from Hold Security claims that one of the biggest ever online heists has been committed by a Russian crime gang. It would appear that the data theft includes, wait for it, no less than 1.2 billion (yes billion) username and passwords along with around half a billion email … Web Development cybersecurity social-media sql | |
Hello everyone, **!WARNING! this function should only be use, WHEN ffmpeg PHP CANNOT be installed in the server.** I just got some free time from tedious and hectic school schedules. About two months ago, I saw a question about "how to get the duration of a given video file?". Of … | |
Our up/down voting buttons don't do anything on iOS devices (iPhone, iPad). Confirmation that they work fine on Blackberry and other mobile devices. Additionally, they work fine on all desktop browsers, including Safari. HTML code looks like this: <div class="vote-arrow downvote" data-vote="-1"> </div> <div class="vote" title="Vote on posts with a comment … Web Development html-css ios ipad iphone javascript | |
hello i m a student & new to php i want to pass id from one page to another page using get & post method but the id can not be passed it shoes the variable in URL instead of value please can any one help me Here is the … Web Development first-post php | |
Hi guys hope your all well, I want to put a quiz into my website that I'm doing. I've found some code for a Multiple Choice-True False Quiz Here is the code, (yes I know its long and there are some reputation in it) You have to add questions by … | |
Hello Everyone, I wrote this script way back in 2008 as Version1. However, I was forced to forget about this, because it was criticized by many developers with BS, MS, and "Seasoned PHP Developer" under their names. During those days, I couldn't stand up for my own reasons, because I … Web Development open-source php | |
A while ago I explained how you could tag articles (see [this thread](http://www.daniweb.com/web-development/php/threads/387961/php-code-to-show-related-posts-on-a-blog)). Now you get a full working example. This code and the SQL script is also available on GitHub. The attached MySQL dump needs to be imported into your database, and you must update the credentials in the … | |
Hey, how to make really vertical menu? Like this one: http://media.smashingmagazine.com/images/navigation-menus/vert.gif I was "reading" article with menu ideas. I found this one. It had link, but it's broken (showing commercial page). Or server hates my IP. Web Development | |
This is sample code for a ASP.Net Login page (using Visual Basic.Net code behind) with OleDB connection to an Access Database using ADO.Net. The datebase used is the Access Northwind Database. With the connection string being placed in the [i]web.config[/i] file. [b]1. [u][i]Web Config[/i][/u] File code:[/b] [code] <?xml version="1.0" encoding="utf-8" … | |
![]() | While extending a mysqli class, I ran into an issue with binding parameters. I've read that db names and table names should not be used as parameters, but while I was pondering this statement... SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '$dbname' I thought, as the db name is a … ![]() |
First things first, the story about this article. Recently I've created an Wordpress Plugin [WordPress - WP - Keywords To Tooltip | CodeCanyon](http://codecanyon.net/item/wp-keywords-to-tooltip/6513598) After a few days, somebody asked me if it's working with Wordpress Multi Site, initially scared, I didn't expect it to be so easy, I've achieved the … | |
# The nature of this tutorial ... This tutorial is designed to walk you through DaniWeb's implicit (clientside) OAuth flow. This is not designed to be an introductory tutorial to OAuth, and we will expect that you are already familiar with the nature of OAuth and/or have read our tutorial … Web Development api daniweb-api javascript | |
This started out as `I love PHP traits! I'm going to use them everywhere! ^_^` and now it has turned into a `Thought Exercise / Learning Experience >_<`. Consider the following example: trait TheErrorOfYourWays{ public function booboo(){ echo 'You had a booboo :('; } } trait SpectacularStuff1 { use TheErrorOfYourWays; … Web Development php | |
![]() | Having just found 'traits' - see http://www.daniweb.com/web-development/php/threads/468928/php-trait-method-conflicts-trait-inheritance#post2043565 I was wondering whether they could be used to share a DB connection object across disparate classes, or would the old singleton or dependency injection methods still be the way to go? I'd value any views on this. Web Development php ![]() |
Hello, I've an array with different type of values: int, null, strings, arrays. I'm trying to remove nulls and empty strings, but I want to save ints, even when it equals to zero, so I tried with `array_filter()`, by default it will remove `0`, `''` and `null`, but by applying … Web Development php | |
This little snippet will teach you all about arrays and arrays of arrays, and so on and so forth. Web Development php ![]() | |
I found a resource that can help some people learn programming a bit better. The resources are provided by Harvard (presented by their students) and I watch a couple of their videos and they were really good. So I thought I should share it with you guys. Here is the … Web Development | |
Case switching is a neat way to make your site a bit more dynamic. it gives you the ability to show blocks of information "on the fly". By attaching the variable name "Content" to our link, we pass that condition in the query string. Note that on the last link, … Web Development php | |
Here's my base class and class for the unauthenticated DaniWeb API calls. Not every method has all features implemented yet, and it's not been fully tested either. Here's how to start using it: include 'DwApiBase.class.php'; include 'DwApiOpen.class.php'; $dwapi = new DwApiOpen(); $result = $dwapi->GetMemberActivityPoints(94719); $result = $dwapi->GetMemberEndorsements(94719); $result = $dwapi->GetMemberReputationComments(94719); … Web Development api daniweb-api php | |
![]() | OK, as promised, here's an updated 'quick(!) and dirty' class for retrieving and setting data via the Daniweb API. It allows the extraction of data based around: # DATA RETRIEVAL & SETTING # ## non-OAuth ## * forums * articles * posts * members * activity points * endorsements * … Web Development api daniweb-api php xml ![]() |
what is the difference b/t PHP and ASP.net php is the server side scripting language and ASP.net is i think same as php but specific to Microsoft .am i right kindly explain differenc | |
hi!guys Today i want to learn from you.. where to start PHP and what tool is the best for me .i am a beginer and i want to expert in PHP so what you suggest me Thanks for reading Web Development php ![]() | |
hi!guys i think you all will be fine,..........Today i want to know from you what is the difference b/t PHP and XML also which is best ,which language i start learing first and what's relation are among b/t two languages..My poin of view is PHP is hypertext preprocessing language used … | |
Wasn't sure yet whether to post this publicly. I've adjusted the PHP code snippet for the OAuth. Curl allows you to trap a redirect and this snippet just shows how to do that for the token. The regex searches for the redirect url in the returned header, it can be … Web Development api daniweb-api php regex session | |
#Web app state management# The current state of the user interface determines which application actions are enabled and thus which html elements are enabled for the user to invoke them. Classes are used in the html to indicate elements that need to be managed. Then jQuery is used to configure … Web Development javascript javascript-jquery user-interface ![]() | |
> There is a vulnerability in certain CGI-based setups (Apache+mod_php and nginx+php-fpm are not affected) that has gone unnoticed for at least 8 years... read more: http://www.php.net/archive/2012.php#id2012-05-03-1 ![]() | |
Here is my code: $(document).ready(function () { $(".submit-text").click(function () { var startdate = $("#startdate").val(); /*This line returns mm/dd/yyyy */ var starttime = $("#starttime").val(); /*This line retruns hr:min AM/PM */ var dtstart = new Date("startdate" + starttime); alert(dtstart); }); }); ****On alert it displays invalid date... but if I use.. var … Web Development javascript javascript-jquery | |
Below is a documented code example showing how to use the SQLite3 class to connect and query your database (and check for errors). IMHO using PDO is a better alternative, as this extension uses mixed technology in a non-standard way (objects, arrays and exceptions). If there are any questions let … | |
Below is a documented code example showing how to use the SQLite functions to connect and query your database (and check for errors). Please note that using the SQLite extension is NOT RECOMMENDED. This extension is no longer available in PHP 5.4.0. If you want your scripts to be future … | |
This demo will show a PHP script using a Smarty template. It assumes basic installation. In the folder where you copy the script, there should be a smarty folder containing the Smarty files. You should create a writable `cache` and `templates_c` folder, and a folder called `templates` where the `.tpl` … | |
IE9 is on the horizon, and there has been plenty said about it. But what about its web development aspects? In this article I look at its web developer tools, and decide whether I'll start using it in my own web development. Like most web developers, I abandoned IE several … | |
Below is a documented code example showing how to use the [PDO](http://php.net/pdo) classes/objects to connect and query your database (and check for errors). If there are any questions, or you want to see different features, let me know. UPDATE: I've encountered a problem with PDO and bit fields (MySQL). If … Web Development php | |
Hi everyone, I'm sure there are people who are using highCharts framework. I'm having a trouble passing the values to jquery code from PHP json. Your help is so appreciated. This is my php section <?php header('Cache-Control: no-cache, must-revalidate'); header('Expires: Mon, 01 Jan 2013 00:00:00 GMT'); // The JSON standard … Web Development javascript json php | |
![]() | Hi I'm trying to figure out how to `<input> $radius` and `echo $pi` without using a **DB**. This is a simple example how this calculate `$pi` which you can run and see how it works: <?php $pi = "3.1415927"; $radius = 8; echo $pi * ($radius * $radius); ?> The … Web Development php ![]() |
# This is a simple HTML String Sanitizing tool. # ## It allows a highly rich,- but safe - html content input to be published on your pages. ## **The script code is very light and to some degree customizable.** * This function takes care of blacklisted tags, which are … Web Development html-css javascript | |
![]() | Hi I been doing some research on **PHP Frameworks**. I want to know what other Daniweb members used as **PHP Frameworks**? I'm still new to understand how it works but would like to know which one will suit my skills, so I can built on ... to move forward to … Web Development php ![]() |
I recently applied for a PHP programming job and they required me to do a coding challenge. One of the challenges involved simulating the card game war which I found intriguing. I "over-engineered" it as they requested, but I still don't think it was good enough for them. Is there … | |
![]() | Hi I want to find out is there a way to check syntax errors on PHP. I went to this site http://php.net/manual/en/function.php-check-syntax.php but I didn't quite understand the example in there. Is there a software that I can check the errors. I used EasyPHP, WAMPP. I appreciate any links or … Web Development php ![]() |
The aim of this tutorial is to save burgeoning self taught developers some of the early pitfalls that lurk on the road to programming enlightenment. It will attempt to do this by distilling the last 50 years of software engineering philosophy into a relatively short single tutorial, applying the concepts … | |
Hey everyone, I tried testing this code if it is true or not. But,apparently, it is indeed true. So, it is not like referencing an element in array and changing its value. Can someone explain it why this is exceptional with numbers, please? var a = 3.14; // Declare and … Web Development javascript | |
I have been looking over current frameworks available and I am looking to settle on CodeIgnitor. What framework and IDE do you use? What are the plus sides, limitations of your choice? | |
Hi I am trying to run a query where the user enters a number, and it searches the table for it and displays any results within 50 of that search. e.g. user searches for 500, anything from 450-550 would be shown. I have the code for showing an exact result … | |
![]() | I'm new to this forum but I do read posts as a non-member and I learn a lot from reading other posts from other member. I'm having problem understand how to write the code correctly. I can't seen to figure out the international shipping cost but for domestic it works. … ![]() |
I just thought I would re-iterate something that I have mentioned a few times in my replies to threads on here in that if your code isn't working, one of the first things to do is actually test your query in the database (i.e. through phpMyAdmin). The reason I am … | |
I originally posted this over on the [URL="http://wordpress.org/support/topic/incorrect-page-content-passed-to-plugin-in-firefox"]WordPress forums[/URL], and got no responses. Eventually I figured out what the problem was and fixed it, but thought I'd repost here in case anyone else is experiencing similar issues (I couldn't find any related articles in my initial search on the symptoms.) … Web Development php session web-browser wordpress |
The End.