-
Posts
5,717 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Adam
-
Need help pulling data from database (MySQL and PHP)
Adam replied to TeamCIT's topic in PHP Coding Help
What's the problem exactly? -
There is a parse error and I can't figure it out help!
Adam replied to co.ador's topic in PHP Coding Help
You can't use isset like that, check the manual for proper usage. -
Off to see "it might get loud" later, shall let you guys know if it's any good (I bet it is)!
-
Yeahh fuck, was way off with this topic. Let's ignore it 'eh!
-
I see. Is this a shared opinion? My knowledge in this area is quite limited to be fair, which why I asked really. --- Allow me to re-phrase the question, how would you go about object instantiation?
-
The search part? What kind of a critique are you after here?
-
Turning the 'OOP conventions' topics into a trilogy I guess, how would you (or what's your preferred method to) implement a singleton design pattern? Mainly interested in how you'd reference the class file and name. A Zend style approach or perhaps something a little more bespoke?
-
This should solve your problem.. http://episteme.arstechnica.com/eve/forums/a/tpc/f/6330927813/m/250006870931
-
how can I apply more than one function to a variable?
Adam replied to co.ador's topic in PHP Coding Help
Your question doesn't make much sense. To make things a bit clearer could you show applying just one function to a variable? Edit: Neeee' mind! -
Without being able to see the context the code is being used in, I'm guessing you're trying to do this before the DOM has loaded? Give this a try: window.onload = function() { var text = 'blahblahblah'; document.getElementById('whatever').onmouseover = function() { myfunction(text); } } Though I'm not fully sure I understand the question..
-
I don't think you're going to achieve this without using some form of Apache module. You can call a script like "index.php/foo/bar" and then parse the extra values out from $_SERVER['PATH_INFO'], however I've read this method doesn't guarantee search engines will index your site properly. My suggestion, change hosting provider!
-
Nice looking site. Not much I can say really, just that I think at times you can feel a little lost. Perhaps some breadcrumbs or something? Also when you resize your comment box the background doesn't follow (check the attachment). Overall though, really good effort! [attachment deleted by admin]
-
Well as the error says 'no such file or directory'; double check the file name and path. Could you show an example of the file string you're passing in? I'm guessing (assuming the file is definitely there) you're using an absolute path, or it's something of that nature.
-
Ha somehow I don't think a book titled "teach yourself xxx in ten years" would sell quite so well! I have rented some of these style of books in the past from college, but as others have said it's basically just a starting guide that you could just as easily get on the internet these days; and wouldn't have to type every bit of example code out yourself.
-
Baah, my bad! Sorry it's early
-
To add to that, you can use mysql_fetch_field to return just 1 field: $id = mysql_fetch_field($emailresult, 0);
-
Technically file names can contain a ', however it's highly unlikely you'll ever come across it. Personally I'd think about the parameters that are allowed, as opposed to which you need to filter out.
-
Why not display the image back to the user (best off with a smaller thumbnail version), then maybe using radio buttons ask something along the lines of: [x] Keep this image (preview here) [ ] Upload new image (input file here)
-
That's exactly the problem, you cannot execute multiple queries from one mysql_query() call. PHPMyAdmin has a delimiter input that it uses to split the queries and execute one by one.
-
Basically we're trying to use the rel attribute to reference the ID of an input we're going to write the value to: It's a bit messy but I can't see any reason why it wouldn't work.
-
That snippet basically takes the contents of a file and inserts "#beginrow#" before the opening tag of all tables rows, and "#endrow#" before the closing tag; storing the result into the $page variable. In that context I can't imagine what purpose it servers.
-
He means that your BB code parser allows users to 'inject' JavaScript through the 'onclick' attribute (most likely all other event attributes too); you need to filter any XSS attempts like these out.