Maq
Administrators-
Posts
9,363 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Maq
-
I guess there was more pertinent code you didn't post.
-
Did you even read my previous posts?
-
So you're not sure... Echo your update query and add some error checking: <php require "../database/db.ini.php"; if(isset($_GET['accept'])) { $theid = $_GET['accept']; $queryString = "UPDATE `users` SET `active`='1' WHERE `id`='$theid'"; echo $queryString; try { mysql_query("UPDATE `users` SET `active`='1' WHERE `id`='$theid'"); } catch(Exception $e) { echo $e->getMessage(); } } ?>
-
Are you sure $theid has a value? If so, are there any errors? You should be catching exceptions from the mysql block.
-
Interesting project, I just finished the survey.
-
1) This sounds like it could be some sort of homework. 2) Have you attempted doing this yourself? You'll never learn if you don't try. 3) Do you have any sample data? 4) What exactly are you stuck on?
-
For the forums there is a nice mobile view already, also IPB also has an app you can download for you phone. For the main forums, I'm not sure there's a need.
-
No, XPath indexing starts at 1. Also, your expression matches on Avslutad . Weep, if you tell us what exactly you're trying to match on, we can give you the best XPath solution. Good to know.
-
After looking at your code I noticed a few things: 1) You should be using the method loadHTMLFile() not loadHTML(). The former method loads HTML from a FILE, the method you were using thought "test.html" was literally the HTML. 2) Turn on error reporting when you are debugging. 3) You should be declaring your namespace, in this case it's xmlns. Try: <?php // Report all PHP errors error_reporting(E_ALL); error_reporting(-1); $husdjur = new DOMDocument(); $husdjur->loadHTMLFile("test.html"); $xpath = new DOMXPath($husdjur); $xpath->registerNamespace("xmlns", "http://www.w3.org/1999/xhtml"); $tableRows = $xpath->query('/html/body/table/tbody/tr[1]/td[1]'); foreach($tableRows as $result) { echo $result->nodeValue; echo "\n"; } ?>
-
First, try closing the
-
It redirects to brm.com...
-
Congrats!
-
Object Oriented Programming Or Traditional Coding?
Maq replied to mostafatalebi's topic in PHP Coding Help
Take a step back and read the comments you made about each paradigm: Given the description of the components & features of your website, it doesn't seem like a trivial task and most likely you will be updating & adding to it. I think you can figure out which one suits your situation. -
Hold on, downloading now...
-
HI, welcome to PHPF.
-
To expand on what requinix suggested, your design seems to be flawed if you need to do something like that. Show us some code and explain what you are trying to do.
-
1) That's not Java, that's javascript. 2) What does "but its not really working" mean? What's supposed to happen? Errors? Please elaborate.
-
You said it right in your post, just add in the condition: WHERE id < 100 AND quantity > 0 ORDER BY id DESC');
-
Set Up Virtual Host In Zend Server Ce 5.6
Maq replied to Max134's topic in Other Web Server Software
Have you looked in the apache logs to see what the error is?- 2 replies
-
- apache
- zend server
-
(and 2 more)
Tagged with:
-
If the work is too easy then you might want to ask your superior to be assigned something a little more advanced.
-
We really can't tell YOU the best way to learn, but, as aforementioned, getting your hands dirty with practice and experience seem to have the best effect. You can read and follow all the tutorials in the world but until you learn to think for yourself for problem solving, design, etc. you won't learn PHP, or most languages for that matter. I started learning PHP by taking a class in school but what really helped me was my first internship. I worked at a company that owned a bunch of e-commerce sites. I primarily maintained and implemented customized feature requests into those sites. While at my internship I registered here to get help and eventually I was the one helping others.
-
Why don't you use an API instead of screen scraping like a barbarian? There are plenty of free and pay for ones, for example - http://developer.espn.com/docs/scores.
-
Yeah ^. Probably this one - http://forums.phpfreaks.com/topic/269121-echo-syntax-error-generating-html-code-with-php-bits-subed-in/?do=findComment&comment=1382895