-
Notice: Undefined offset: 0 in
I'd try something like this function getAllVotes($id) { ... ... if(mysql_num_rows($r)==1)//id found in the table { $row = mysql_fetch_assoc($r); $votes[0] = $row['votes_up']; $votes[1] = $row['votes_down']; } else { $votes[0] = 0; $votes[1] = 0; } ... ... } I assume that its that the $vote is not set when the row in the database does not exist.
-
Post a screenshot of your desktop!
Here is mine, as soon as I saw the picture I immediately set it as my background. (http://cl.ly/7uyK)
-
Out Of Bordom Feedback Please
Maybe worth including a simple bit of usage code. It may just be the forums doing, but the indentation is horrible, very difficult to read I must say. Would be nice if it could be corrected Thanks Surely with every new object that has Data as a superclass will create a new DB connection? It seems like theirs a little mix up in terms of responsibility.
-
I am starting a line of HTML, HTML5, CSS, CSS3, Javascript and PHP tutorials… Thoughts/ wants?
I prefer video tutorials where the teacher is actually talking his way though what he is doing. If its just going to be written I would much prefer to read an article about it. Keep it up though, and stick around the forum for ideas on what people want to learn about. If you spot a common problem which is been asked again and again, make a video on that!
-
need helpppp!
- Error 1045 connecting to MySQL from Dreamweaver
I know that on CPanel the databases can't be accessed remotely unless you specify which IP addresses can access them. Are you sure your home IP is allowed the access it?- Rant
Do hope that the day got at least a little better for you!- Landed a job
Very well done! I'm also starting a new temp summer job on Monday- Stuxnet: Anatomy of a Computer Virus (Infographic)
Found it on my twitter feed, very interesting video. http://vimeo.com/25118844- Hey
Cheers. Just left York, London here I come! p.s first class train journeys are awesome- Waste your day
Amazing what you can achieve these days!- Looking for some feedback on my design
I like the idea of the mutli colored gradient. Though the quality is quite low, especially towards the edges. It also doesn't blend in well with the footer text, since its not aligned, half the text is in front of it, half isn't. I like the typography, loves sites which have large text. In the navigation there is 4 styles, so I presume there the different mouse states White Text - Standard text? Blue Text - Rollover? White Text Blue Background - Active? Green - Whats the green for? Its the only bit of green on the page, is it just meant to make the contact stand out?- So, what IDE/software do you use to code?
Its easy to miss been right down at the bottom of the list.- Notice: Undefined index: username
I think webdesigner93 was just showing what the error is, and how to solve the error, then the OP could adapt it for his situation. Once the preg_match is added its still a short solution though. $username = (isset($_POST['username'])) ? preg_replace('#[^A-Za-z0-9]#i', '', $_POST['username']) : '';- So, what IDE/software do you use to code?
Eclipse and Netbeans (Depending what I'm doing). I prefer to use Eclipse though, as its the best IDE for the types of development work I do. (I'm sure there is already a thread about this, http://www.webdesignerforum.co.uk/topic/47955-so-what-idesoftware-do-you-use-to-code/) - Error 1045 connecting to MySQL from Dreamweaver