-
Posts
471 -
Joined
-
Last visited
-
Days Won
8
Everything posted by dalecosp
-
Nope. I use Joseph Lencioni's SLIR, and think it's the bee's knees
-
The only caveat I'd add to this discussion is don't discount a smaller and leaner approach without thinking it through. Some people, once they start to wrap their head around OOP, think that EVERY D**N THING needs to be an object, and that EVERY D**N OBJECT has to be GodLike. That's ain't always so (and in the case of the latter, probably hardly *ever* is that so...). And, you can have "lean" procedural and also have "lean" OO code.... I've seen "cool OOP designs" that are such resource hogs that a few lines of Procedural runs circles around them. It's all in the ability of the programmer to understand the problem and write the BEST code to meet the goal. That being said, some of my messes are procedural, and some of them are OO ... but I'm cleanin' em' up whenever I get the chance ...
-
Well, I hope you do too, and I'll wish you luck. I'm not sure this site's as popular as it once was due to some issues that may have been beyond their control ;-) But there *are* some good minds here, some of which I've known for a long time on other forums ...
-
Thanks for being polite, and "Hi" back at ya!
-
Welcome to the site, Sincerely, Someone who doesn't bother with DreamWeaver
-
Yes. Here's one way; $Q is an array of queries. function transaction ($con, $Q){ mysqli_query( $con, "START TRANSACTION" ); for ( $i = 0; $i < count( $Q ); $i++ ) { if ( !mysqli_query ( $con, $Q[$i] )) { echo 'Error! Info: <' . mysqli_error ($con) . '> Query: <' . $Q[$i] . '>'; break; } } if ( $i == count ( $Q )) { mysqli_query( $con, "COMMIT" ); return 1; } else { mysqli_query( $con, "ROLLBACK" ); return 0; } }
-
Alert: The phpfreaks forum members data appears to have been stolen.
dalecosp replied to gizmola's topic in Announcements
DO please enlighten us. How many websites do you run, how many databases, and how long since you had a security incident? -
Incidentally, if you're not sure what this software is doing, I'm not sure I'd put it on the WWW. The base64 string looks a little like an attempted malware insertion. Probably not a very good one ... it depends on register_globals(), by the look of it....
-
No, like this: <?php //everything goes here, no more <?php or ?> until after the header() calls, wherever they are.
-
Which open source what? Open Source Audio Player? What's your audio format? Most browsers play *mp3 natively these days.... <audio src="/sample_music_files/song.mp3" controls="controls" preload="none">
-
The Super Cool Mostly Official Frankenstein-Code Game Thread!
dalecosp replied to .josh's topic in Miscellaneous
Yeah, I figured that out. Still wanted to see what Franky had to say though. Somehow it was more interesting that w/e the heck was going on here yday afternoon -
Is there a "delete" option on your OP? (I don't really know if there is, just asking :-) )
-
If the action is onSubmit(), then it's JavaScript.
-
The Super Cool Mostly Official Frankenstein-Code Game Thread!
dalecosp replied to .josh's topic in Miscellaneous
Fert: Franky doesn't parse now. You're missing a closing parenthesis here: if(isset($_GET[lang1]) { <placeholder> -
So, you're testing a value from a POSTed form? Otherwise, this is a JavaScript task.
-
I might use PHP to set the cookie, because JavaScript is a tad clunky where cookies are concerned, so if I can do it in server-side, I almost always do. Can you do it server-side?
-
I'd agree re: popularity. By the same token, if someone charges you money for the software, then they are, technically, and I think you couldn't refute that with standard word definitions, in the software business as a profession.
-
Also, PHP is extremely versatile, and has a history, and, like many programming tools, there have been / are several ways to use it. Assuming that one programmer uses PHP the same way as another could lead to wrong assumptions and inferences when reading / trying to understand code. For this reason a good book is often a great resource, as they will typically start with "Hello World" and gradually introduce concepts and constructs until you become "relatively competent". I recommend books because I've yet to see an online resource with the breadth of scope and logical flow that, say, Larry Ullman's PeachPit Press books have. There are some clunkers, however; some of them are basically printed versions of the online PHP manual, which I feel works best as a reference work rather than a tutorial (Looking at you, SAM's and possibly even at O'Reilly [although usually O'Reilly does great stuff]). I won't offer opinions on the Wrox work as I'm friends with some of those writers, reviews are here. I'd agree, although in large-scale projects it often seems like you need a secretary just to keep the copious notes that you need to learn a system; not particularly the fault of the OOP paradigm, or the FP paradigm, but a lot of "professional" software in PHP has shipped with rather poorly-documented code being a main feature....
-
Could you show your table schema?
-
PHPMyAdmin for a web-based solution, HeidiSQL on the client-side. It's fairly DB agnostic ... we first installed it for use against MSSQL DB's....
-
Fatal error: Call to undefined function mysqli_connect()
dalecosp replied to et4891's topic in MySQL Help
Is the value of extension_dir set correctly? <?php phpinfo(); Load a page with the above code, look in it for the extension paths, and see if the files you need are actually in those folders. -
Welcome! What an interesting username, !
-
UTF-8 from BD doesn't match UTF-8 from website
dalecosp replied to JoaoPedroCG's topic in PHP Coding Help
Inspect the headers being sent by your webserver ... is it sending UTF-8? -
Because you're relying on HTTP transport to get DATA ... Lemme ask you this. Say I wanted to get 500,000 names from a list. Should I query a local database server or load a web page 500,000 times?