Search found 61 matches
- Thu Mar 22, 2007 10:09 am
- Forum: Javascript
- Topic: Javascript Date Selector
- Replies: 6
- Views: 1406
Javascript Date Selector
Quick question for the gurus here: Does anyone know how I'd go about using javascript to produce some kind of date selector? What I'm trying to do is to produce a facility to allow users to pick a day/month to arrange a service visit ( Project for a friend who's going to business as a freelance IT t...
- Sun Mar 11, 2007 10:04 am
- Forum: Miscellaneous
- Topic: ASP.NET "The resource cannot be found."
- Replies: 2
- Views: 5759
ASP.NET "The resource cannot be found."
feyd | Please use , and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color] Does anyo...
- Fri Mar 09, 2007 6:51 am
- Forum: PHP - Code
- Topic: mysql_real_escape_string causing strange errors
- Replies: 3
- Views: 808
Problem's fixed now. I needed to change the escape_string function to this:
Works on my dev box and main site.
Code: Select all
function escape_string($input) {
return mysql_real_escape_string($input);
}- Thu Mar 08, 2007 9:15 am
- Forum: PHP - Code
- Topic: mysql_real_escape_string causing strange errors
- Replies: 3
- Views: 808
mysql_real_escape_string causing strange errors
Here's the problem, I'm trying to "clean" user input with mysql_real_escape_string(), for some reason, it's destroying all variables it touches. Here is a simplified version of the code I'm using: $connector = new DbConnector($dbuser,$dbpass,$dbname); foreach($_GET as &$tmp) { $tmp=$co...
- Wed Feb 28, 2007 9:30 am
- Forum: Databases
- Topic: Efficient query for gallery front page
- Replies: 3
- Views: 811
- Wed Feb 28, 2007 9:07 am
- Forum: Databases
- Topic: Efficient query for gallery front page
- Replies: 3
- Views: 811
Efficient query for gallery front page
feyd | Please use , and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color] Sorry the...
- Wed Feb 28, 2007 8:57 am
- Forum: Databases
- Topic: database normalization
- Replies: 10
- Views: 1748
- Tue Feb 27, 2007 7:59 am
- Forum: PHP - Code
- Topic: Login Code... Will it work?
- Replies: 18
- Views: 3668
- Tue Feb 27, 2007 5:59 am
- Forum: PHP - Code
- Topic: Login Code... Will it work?
- Replies: 18
- Views: 3668
jolinar , your function is fine, but it is not enough. All data should be mysql_real_escape_string()-ed before putting it in a mysql_query(). If you have to stop and think if your check was enough, this means it's not enough. Your function is about validation , which is a part of the code logic lev...
- Thu Feb 08, 2007 9:57 am
- Forum: PHP - Code
- Topic: Login Code... Will it work?
- Replies: 18
- Views: 3668
- Wed Feb 07, 2007 7:24 pm
- Forum: Databases
- Topic: problem with ambiguous field names (mysql 4.1)
- Replies: 2
- Views: 900
- Wed Feb 07, 2007 4:43 pm
- Forum: Databases
- Topic: Is using, ORDER BY RAND() bad?
- Replies: 10
- Views: 1512
I'd suggest doing something along these lines:
applied to all fields (or be lazy like me and create a routine to get everything from a for and bung it in an associative array)
Code: Select all
$random = rand();
$random segment = mysql_result($resultset,$random%mysql_numrows($resultset),"fieldname");- Wed Feb 07, 2007 4:38 pm
- Forum: Databases
- Topic: problem with ambiguous field names (mysql 4.1)
- Replies: 2
- Views: 900
problem with ambiguous field names (mysql 4.1)
feyd | Please use , and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color] Does anyo...
- Tue Nov 21, 2006 9:08 am
- Forum: PHP - Code
- Topic: IE - Hard refresh needed to accept change in login status
- Replies: 8
- Views: 1782
Problem solved. It was this little piece of code:
I tried commenting it out and it works fine. Of course I'm kinda worried about the security. I guess it's time for me to head over to the security section of the forum.
Code: Select all
session_cache_limiter('private');
$cache_limiter = session_cache_limiter();- Tue Nov 21, 2006 8:15 am
- Forum: General Discussion
- Topic: What's your favourite PHP Editor?
- Replies: 533
- Views: 235121
PHP Designer 2005 Really good, at least good as far as I know. Agreed. I've recently started using PHP Designer (2007, kinda strange considering we're in 2006). Personally, I'm inclined to stick with the free version rather than the commercial version (since all my PHP is for my own personal use, o...