
trq
Staff Alumni-
Posts
30,999 -
Joined
-
Last visited
-
Days Won
26
Everything posted by trq
-
new to PHP - validating checkboxes in php - please help!!
trq replied to plaedien's topic in PHP Coding Help
You say you've already read some examples and didn't understand them, how could we make them easier to understand? Instead, why don't you post the code your having trouble with and a description of your actual problem? -
The "email" type attribute will actually validate the data it contains if you set the "required" attribute. Of course, not all browsers yet support this functionality however.
-
The reason it always displays "Yes" is because both "N" and "Y" evaluate to true. You need an expression that will evaluate to true or false. "<td>" . $result[7] == 'Y' ? "Yes" : "No" . "</td>";
-
What your evaluating needs to make sense. Your trying to execute * 1.210 What exactly do you expect to happen?
-
eval.
-
If you think you know how they do it, what is your question?
-
MDN is probably the best free resource getting around. https://developer.mozilla.org/en/JavaScript/A_re-introduction_to_JavaScript
-
You seriously need to take a step back a bit and read some of the documentation that you have been linked to on numerous occasions. PHP requires a HTTP server with PHP installed and configured in order to work. There is no way around this. Once you have a working HTTP server with PHP installed and configured it will be able to parse .php files and make use of PHP libraries such as PHPMailer. If I see another of these threads I'm closing it and will kindly ask you to move on.
-
please could you comment on my comments OOP beginner!
trq replied to wright67uk's topic in PHP Coding Help
That is because you cannot access the $type property directly anymore, you need to access it via the new methods you have created. May I suggest you take a look at the examples in the manual? This is all pretty straight forward stuff. http://php.net/oop5 -
What to de next as I cannot view my Hello.php in browser?
trq replied to learner_php's topic in PHP Coding Help
Both preferably. You need a http server with php installed and configured to use while developing and of course your production server needs the same. -
please could you comment on my comments OOP beginner!
trq replied to wright67uk's topic in PHP Coding Help
Haha. My fault. Your missing the function keyword (as was I in my original example). public function setType($type) { $this->type = $type; } public function getType() { return $this->type; } -
What to de next as I cannot view my Hello.php in browser?
trq replied to learner_php's topic in PHP Coding Help
You need to install and configure PHP. See http://www.php.net/manual/en/install.windows.php -
HTML is interpreted client side by the browser. PHP needs to be interpreted server side in order for the server to send the resulting html to the browser. You need a HTTP server with PHP installed and configured. This is all covered in the manual: http://www.php.net/manual/en/getting-started.php
-
please could you comment on my comments OOP beginner!
trq replied to wright67uk's topic in PHP Coding Help
As I said, using setBar doesn't really make any sense does it? Fix it, and post your current code. -
This topic has been moved to Apache HTTP Server. http://www.phpfreaks.com/forums/index.php?topic=357293.0
-
A better description of your problem would be helpful.
-
please could you comment on my comments OOP beginner!
trq replied to wright67uk's topic in PHP Coding Help
Kinda on the right track. You would call your methods setType() and getType() though. Doesn't make much sense using Bar. -
Ive said it before, but there is no such thing as a good free host. Anyway, we are not brining up this same subject again in another thread. See http://www.phpfreaks.com/forums/index.php?topic=117475.0
-
please could you comment on my comments OOP beginner!
trq replied to wright67uk's topic in PHP Coding Help
class Foo private $bar; public setBar($bar) { $this->bar = $bar; } public getBar() { return $this->bar; } } -
How do I block visitors from certain countries?
trq replied to doubledee's topic in Apache HTTP Server
Event with a lot of ip addresses, the performance hit would be negligible. Not really. We run one of the largest PHP communities online and haven't had any serious issue with people from specific origins. Sounds like a bit of a beat up to me. Not hard at all if you have a dedicated server. -
How do I block visitors from certain countries?
trq replied to doubledee's topic in Apache HTTP Server
It's not a very reliable or hard to work around solution but, you could find out what ip ranges are allocated to that country and use a Deny rule to block that ip range. http://httpd.apache.org/docs/2.2/howto/access.html -
This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=357370.0