## Contents ## Overview 1. Alternatives to Deprecated mysql_* Functions 2. SQL Injection: What to do with $_POST and $_GET variables 3. How to Insert Tablenames and Fieldnames Properly 4. What to do With Dynamic Values? 5. How to Use Aggregate Functions (COUNT, SUM, MIN etc) 6. How to Paginate and Create Page Number Links? 7. How do I Store Files: Filenames or BLOB? 8. Splitting the Big Table: Normalization 9. How to Get Data From More Than One Table 10. How to Store Menus and Submenus 11. Storing and Retrieving Authentication Data References and Further Reading _______________________________________________________________________________________________ ## Overview …

Member Avatar
Member Avatar
+6 forum 6

The recent flood of "technical problems" with computers at Delta Airlines, the New York Stock Exchange, the Wall Street Journal etc. make me wonder if we have become too dependent on these machines? Are they maintained by less and less competent people? Has the complexity exceeded human comprehension?

Member Avatar
Member Avatar
+0 forum 28

In this thread: https://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/495011/jquery-gallery/3 I tried to format the html in the editor without success. I narrowed it down to <script> tags. All lines prior to the <script> tags seem to be missing a new line and HTML looks as if it's been posted as one long line. If a mod/admin, you can see the underlying format (in Edit Post view) is correct, but not viewed properly.

Member Avatar
Member Avatar
+2 forum 5

Hi, Whenever I boot up my Presario it does things in this order: Starts making the fan noise Displays the red Compaq logo The Compaq logo gets weirdly distorted It reboots and does it all over again! I can't get into the BIOS or any other preferences, and I can't get to the Control Panel either. When I try to put in a recovery cd, it spits it back out and goes nuts again. Sometimes, if I leave it alone for a while (about 45 minutes- 3 hours) it lasts longer when booting and can actually get to Windows XP. …

Member Avatar
Member Avatar
+0 forum 1

**Problems 1: Spiral matrix - Advanced** Source of the problem: [Here (not in English)](http://www.spoj.com/PTIT/problems/BCACM11B/) Spiral matrix is formed by filling number 1 in 1st row 1st column, after that, filling with increasing number by clockwise, example: 1 2 3 4 5 16 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9 Write a program that inform the value of cell (x, y) of a square spiral matrix sized n x n. *Input:* First row record the number of tests, not greater than 100. Each test record in one row, include …

Member Avatar
Member Avatar
+0 forum 1

Hi, colleagues! Last autumn I've started a small web-site with collection of programming problems for beginners. To solve the tasks here users are to submit answers calculated after processing some randomized data. I.e. it is resembling ProjectEuler which I admire greatly :) http://codeabbey.com/ - that is how it looks like. Now I want to add a new functionality - mini-challenges to write the smallest code possible - i.e. there would be some tasks for which the length of solution is assessed and ranked. However, while all other tasks could be solved in any possible language (and users even are not …

Member Avatar
Member Avatar
+0 forum 3

i can't fix my errors. please help me out... here's the ITEMTYPE part of my code: //itemtype.h::::: #ifndef ITEMTYPE_H_INCLUDED #define ITEMTYPE_H_INCLUDED class itemtype public: itemtype(); void print()const; void initialize(int number); private: int value; }; #endif //itemtype.cpp:::::: #include "itemtype.h" #include <iostream> using namespace std; itemtype::Itemtype() // this is the line where the errors are shown { value=0; } void itemtype::initialize(int number) { value=number; } void itemtype::print()const { cout<<value<<" "; } ERRORS::::::: line 27: error: ISO C++ forbids declaration of 'Itemtype' with no type [-fpermissive] line 27:error: no 'int itemtype::Itemtype()' member function declared in class 'itemtype'

Member Avatar
Member Avatar
+0 forum 11

this problem occured shortly after I fixed the explorer.exe issue, which ended up being a rootkit. I'd figured my .NET packages were corrupted so I just reinstalled them recently. 37% is the lowest it's ever happened to me, but normally my RAM is over 50% when it happens... I'll just get actions like: - clicking a shortcut does nothing - opening a new window or program fails - dialogs refuse to open - context menus don't fully display at worst: - programs report errors and/or crash when running - programs (such as Winamp) hang when starting these are all signs …

Member Avatar
Member Avatar
+0 forum 2

I have tried to register in some forums, but there was a message that words are not typed coorectly, or the answer of a question which is always wrong, why they do that

Member Avatar
Member Avatar
+0 forum 7

I am looking for help in how to implement function avg() that takes as input a list that contains lists of numbers. Each number list represents the grades a particular student received for a course. List for a class of four students. ([95,92,86,87],[66,54,],[89,72,100],[33,0,0]) the function avg should print one per line, every student's average grade.

Member Avatar
Member Avatar
+0 forum 3

Hello I'm running win xp3, I can't access the Internet even after plucking in the ethernet cable behind my computer. I tried Pinging the loop back addres 127.0.0.1 I received replies. but ping anything else does not reply, also running the "route print" command on the command prompt, didn't give me a complete info, i could nt find the default gateway ip addr. is it the NIC?

Member Avatar
Member Avatar
+0 forum 9

i cant center it, please help <html> <head> <title>Facebook</title> <meta name="keywords" content=""> <meta name="description" content=""> <style type="text/css"> #sddm { margin: 0; padding: 0; z-index: 30} #sddm li { margin: 0; padding: 0; list-style: none; float: left; font: bold 11px dodger} #sddm li a { display: block; margin: 0 1px 0 0; padding: 4px 10px; width: 120px; background: black; color: red; text-align: center; text-decoration: none} #sddm li a:hover { background: #49A3FF} #sddm div { position: absolute; visibility: hidden; margin: 0; padding: 0; background: #EAEBD8; border: 1px solid #5970B2} #sddm div a { position: relative; display: block; margin: 0; padding: 5px 10px; …

Member Avatar
Member Avatar
+0 forum 5

[This](http://docs.oracle.com/javase/tutorial/essential/concurrency/deadlock.html) is the example i was looking at. The docs say that trying to access the bowBack() method is creating the deadlock , but im new to threads , and i really dont understand why this is happening. In need of some guidance here...

Member Avatar
Member Avatar
+0 forum 3

**I got this error on line 369** Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/a4670304/public_html/lol.php on line 369 <?php // session_start(); require_once('auth.php'); include("dbconnection.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="icon" href="img/Untitled-1.png" type="image" /> <link rel="shortcut icon" href="img/Untitled-1.png" type="image" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="keywords" content=""> <meta name="description" content=""> <title>Welcome <?php // echo $_SESSION['SESS_FIRST_NAME'];?></title> <link type='text/css' href='css1/demo.css' rel='stylesheet' media='screen' /> <link type='text/css' href='css1/basic.css' rel='stylesheet' media='screen' /> <link href="format.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="css/reset.css" type="text/css" /> <link rel="stylesheet" href="css/master.css" type="text/css" /> <script type='text/javascript' src='js/jquery.js'></script> <script type='text/javascript' src='js/jquery.simplemodal.js'></script> …

Member Avatar
Member Avatar
+0 forum 9

Okay, so I am horrible with computers so this may be just an easy fix. For the past two days Internet Explorer keeps on starting on its own. It does not open to an actual website but in the search bar there are always random, incomplete urls (the most recent example: http://nskduikwwxzkok/). It's my laptop for class so it is unbelievably annoying. Please, please help me out.

Member Avatar
Member Avatar
+0 forum 2

i m in leave for month when ever back to position i may have new problems in dicussion

Member Avatar
Member Avatar
+0 forum 1

Hey Guys, So I was doin a tutorial and I incorporated it into my code and it works for the most part. The program gives you a list of town names you pick one and hit search. All good so far then the program goes into the database and pulls the relevant info from 6 tables and they display in the next gui on a Jtable. Only problem is the column header are taken from the database aswell but I want Generic column titles as the ones from the table reflect the table they were pulled from and since there …

Member Avatar
Member Avatar
+0 forum 4

Hello everyone at daniweb, I've had a bit of a problem with my computer recently but managed to get it up and running earlier today. Problem is, when I had it running, a message appeared telling me it was installing my Nvidia 8800GT card. Now, when this happened I figured there had to be something wrong, since I've had the computer for a couple of years and obviously it had already been installed when I got it. But naturally, I went along with this as it seemed to be fairly important, but when it had installed it told me I …

Member Avatar
Member Avatar
+0 forum 9

I started my career as a UI developer.. My 1st task is too make HTML5 to work in all browser especially IE family... But i heard HTML5 wont support mostly in IE.. My question is... how to Make HTML5 work in old versions of Internet Explorer ?? What are roles and responsibilities of UI developer?? What are language i have to learn except jquery, css3 and html5 to shine as UI developer ??

Member Avatar
Member Avatar
+0 forum 3

http://en.wikipedia.org/wiki/Transposition_cipher#Columnar_transposition This is wiki site of what am trying to do #include <iostream> #include <cstring> #include <cmath> using namespace std; char GRID[3][80]; int MENU(int menu_choice); int REVIEW_OF_GRIDS_FIRST_79_CHARACTERS(int four); int main() { cout << " This is RAIL FENCE CIPHER\n" << endl; //----------------------------------------------------------------------------------------------------- //filing GRID with asterisks(*) char asterisk='*'; int k=-1; int i=0; while(k<2) { k++; while(i<80) { GRID[k][i] = asterisk; i++; } cout << "\n" ; i=0; } //----------------------------------------------------------------------------------------------------- //plaintext input into GRID char plaintext[0]; cout << "Enter message to encode:" << " NOTE:Asterisk(*) symbol is not allowed\n"; cin >> plaintext; int grid_row[5] = {0,1,2,1,99}; //012101210121 is pattern and 99 …

Member Avatar
Member Avatar
+0 forum 4

A friend sent me his website coding he did in iweb on his mac and wanted me to upload it to my hosting. The navigation links don't work and I have no idea what the problem is as his coding is completely all over the place and horrible and any time I try to change the coding the website doesn't show up correctly. As it is the website is horrible; however, if you can check it out and see if you know what the problem is in the menu links I'd greatly appreciate it! Let me know if you can …

Member Avatar
Member Avatar
+0 forum 4

in my pc in desktop pink colour line is coming.

Member Avatar
Member Avatar
+0 forum 3

Isn't the remainder should be 0? But in programming 2%5=2, 4%5=4 Please explain

Member Avatar
Member Avatar
+0 forum 1

So I'm having some problems with my code here. and I'm not sure whats wrong. Im following a textbook on how to do it and this is basically the same format that they have for a random number function. Any feedback is appreciated. <html> <head> <title> Grades </title> <script type="text/javscript"> function Grader() { var am1=parseFloat(document.getElementById('homework').value*0.25); var am2=parseFloat(document.getElementById('labs').value*0.20); var am3=parseFloat(document.getElementById('midterm').value*0.25); var am4=parseFloat(document.getElementById('final').value*0.30); var hw=homework*am1; var lbs=labs*am2; var mt=midterm*am3; var fe=finals*am4; var total = am1+am2+am3+am4; document.getElementById('outputDiv').innerHTML='Your final grade is ' + total; } </script> </head> <body> <p> <h2>Grades</h2> <h3>Enter your grade for each section</h3> <TABLE BORDER=3 CELLSPACING=3 CELLPADDING=3> <tr> <td>Type</td> <td>Weight</td> <td>Grade</td> …

Member Avatar
Member Avatar
+0 forum 1

Hey, I'm new here and could use some help. I just moved into a new apartment, and I need some help getting my wireless network set up. I cannot access the internet through my router. The internet is provided through my apartment complex, so I don't have the modem or anything, just the ethernet jack in the wall. I can connect if I hook up the ethernet cord directly to my computer, but I cannot connect to the internet when I hook up my wireless router. My macbook does connect to the network, but it does not allow me to …

Member Avatar
Member Avatar
+0 forum 3

I'm trying to fix my granparents Gateway NV53 laptop. The only thing that is wrong with it is that the screen has horizontal lines on it. The lines change (they are usually white, grey, or black) positions and color on the screen while in use. When I connect it to a display it I can see the normal picture on the external display. But the laptop screen still has lines running through it. I have tried starting it up in safe mode. It didn't work. I have taken out the screen and am waiting to find out whether it is …

Member Avatar
+0 forum 0

Hi, I have recently been having a few issues with my Toshiba laptop. It is about 5yrs old and rund on Vista, and recently is won't turn on, and all I see is a black screen with a white cursor. I have tried running sc /scannow from the task manager, but this only brings up a box, which just flashes and then disappears. Internet explorer was also doing the same thing, flashing up and then disappearing, even from the task manager. The system error scan that it offers when restarting does nothing, and it ususally takes about four attempts to …

Member Avatar
Member Avatar
+0 forum 9

I recently built my first computer from the ground up. Spent quite a bit of time on newegg picking all the parts i wanted and if they are compatible. After i got everything put together and booted it up, everything seems to power up = all the fans are turning (even on the graphics card), all LEDs turn on, hard drive and disk drive seem to function. But no video ever comes up on the montior. just says no signal. ive checked all connections and verified everything is compatible online. no answers. im lost. please help here are all the …

Member Avatar
Member Avatar
+0 forum 11

Okay, so this is my final assignment for a class I am taking. I'm making a Book Library Database that keeps track of all books that are entered and changed, things like that. I figured a useful feature would be saving your data in a text file so that it could be loaded again any time. I successfully managed to get the program to save my data into a text file but I can't seem to Load that text file in a way that the lines are assigned to their correct variables again. I'll attach some code... (WARNING: It is …

Member Avatar
Member Avatar
+0 forum 11

Hi guys. so I have been trying to solve this problem and I wrote a bit of which I think its part of the solution. so I would apreciate a help from you guys. The problem: A palindrome is a word, phrase, or any other sequence of letters that can be spelled the same way in either direction. For example, “level” and “noon” are palindromes. Write a recursive logical-function that returns 1 if the word is a palindrome and 0 otherwise. You may do it by matching the first letter with the last, the second with the next-to-last, and so …

Member Avatar
Member Avatar
+0 forum 9

The End.