Forum: PHP 2 Days Ago |
| Replies: 6 Views: 228 You shouldn't be using session_register or session_is_registered anyway, take a look at the PHP documentation.
http://php.net/session_is_registered |
Forum: PHP 5 Days Ago |
| Replies: 10 Views: 335 Right below # BEGIN SCRIPT place
error_reporting(E_ALL); Then follow the FAQ on the main page of the PHP forums |
Forum: PHP 34 Days Ago |
| Replies: 4 Views: 264 If you want to place it dynamically inside another page you would have one PHP file generate the image and then point to that in an <img> tag.
But to set the content-type just use:... |
Forum: PHP Nov 12th, 2009 |
| Replies: 109 Views: 3,852 It doesn't matter what year you're talking about a hash is by definition impossible to reverse. A hash is ONE WAY. You may be able to use a supercomputer to calculate hash collisions which result in... |
Forum: PHP Nov 11th, 2009 |
| Replies: 109 Views: 3,852 OK, I gotta throw my 2 cents in here. There is no such thing as a de-hasher. A hash is ONE WAY. The only thing that can be done is to produce every possible string against the salt using the same... |
Forum: PHP Nov 10th, 2009 |
| Replies: 3 Views: 271 Don't use HTTP_COOKIE_VARS, use _COOKIE
http://php.net/$_COOKIE |
Forum: PHP Oct 13th, 2009 |
| Replies: 4 Views: 804 You have an extra , right before the WHERE |
Forum: PHP Oct 6th, 2009 |
| Replies: 107 Views: 3,564 There's really no better tutorial for regular expressions that http://regular-expressions.info |
Forum: PHP Oct 4th, 2009 |
| Replies: 6 Views: 537 http://php.net/curl Google is your friend. |
Forum: PHP Oct 3rd, 2009 |
| Replies: 11 Views: 657 There really is no "best" with IDEs. Try a few out for a week or so (enough to get to know the IDE) then try another one. At the end figure out which one you like the best and stick with it.
Some... |
Forum: PHP Oct 1st, 2009 |
| Replies: 2 Views: 824 Add a captcha
http://recaptcha.net/ |
Forum: PHP Sep 29th, 2009 |
| Replies: 3 Views: 368 Just no. For two reasons: Reason 1) You're duplicating code, if he wants to change the td's to dd's or something like that he has to change it in two places, Reason 2) I'm not even going to begin... |
Forum: PHP Sep 11th, 2009 |
| Replies: 5 Views: 383 http://php.net/preg_match |
Forum: PHP Sep 10th, 2009 |
| Replies: 3 Views: 1,472 ... ... php.net/parse_url (http://php.net/parse_url) |
Forum: PHP Aug 19th, 2009 |
| Replies: 2 Views: 243 Cool, how's that working out for you? |
Forum: PHP Aug 3rd, 2009 |
| Replies: 4 Views: 299 It's really up to you, everyone learns differently. For you it may help you learn faster. Personally, I don't know ActionScript so I can't attest to their similarity. With PHP having so many built-in... |
Forum: PHP Jul 22nd, 2009 |
| Replies: 4 Views: 536 you're already in PHP, you don't need to do <?php echo Also, you're in double quotes so you must surround the $onrow["index"] with {} ie., {$onrow["index"]} |
Forum: PHP Jul 13th, 2009 |
| Replies: 2 Views: 315 // if you're using XHTML
str_replace('<br />', "\n", $string);
// if you're using HTML
str_replace('<br>', "\n", $string); |
Forum: PHP Jun 29th, 2009 |
| Replies: 3 Views: 464 If you want everything accept for letters and numbers you can use
$pattern = '/[^a-z0-9]/i';
If you are specific about \/:"?<*>| then it's this
$pattern = '#[\/:"\?<\*>|]#'; |
Forum: PHP Jun 15th, 2009 |
| Replies: 2 Views: 292 A) Invert that $_SESSION['username'] condition to just exit or something if it's not present instead of wrapping ALL of your code in an if
B) Use a bit more meaningful variable names than ij.
C)... |
Forum: PHP Jun 12th, 2009 |
| Replies: 2 Views: 391 That is a variable property in the same why variable variables are created. For example:
// variable variable example
$var = "hello";
$hello = "world";
echo $$var; // world
// variable... |
Forum: PHP May 29th, 2009 |
| Replies: 10 Views: 860 Business logic just means any logic about how the program runs like when/how something should be updated in the database, etc. (Yes, PHP) |
Forum: PHP May 20th, 2009 |
| Replies: 1 Views: 396 If the account has IMAP enabled use that. http://lmgtfy.com/?q=php+imap |
Forum: PHP May 18th, 2009 |
| Replies: 4 Views: 702 $variable[]=$row[0];
Arrays use the []= operator, not += |
Forum: PHP May 8th, 2009 |
| Replies: 2 Views: 809 I usually like to take the time and explain why its wrong but I'm lazy today so I'll just fix it.
<?php
class DBconnection {
private $host="localhost";
private $user="root";
private... |
Forum: PHP May 7th, 2009 |
| Replies: 3 Views: 3,329 If you've gotten the error "Supplied argument is not a valid MySQL resource" you're in luck because so has everyone else that has ever used PHP... ever. The error is caused by a number of things... |
Forum: PHP May 6th, 2009 |
| Replies: 13 Views: 446 well yeah, the fact that you left out that it said data.Student is pretty big :) lowercase Student on line 32 , case is important, that should fix it |
Forum: PHP May 4th, 2009 |
| Replies: 26 Views: 1,251 What do you mean "what do we do"? I just told you what to do. You have to set $_SESSION["login"] when a user logs in. I think its the 4th time I've said it now |
Forum: PHP Apr 30th, 2009 |
| Replies: 13 Views: 1,403 If you're doing a container of sorts where you dynamically add variables and get them you might want something like this.
class Container
{
private $holder;
public function __get($key)
{... |
Forum: PHP Apr 20th, 2009 |
| Replies: 3 Views: 1,340 In all browsers that's how it is supposed to work. Sessions are saved to cookies which either expire after a certain amount of time or after a user closes their browser. There would be absolutely no... |
Forum: PHP Apr 10th, 2009 |
| Replies: 1 Views: 398 You don't need a switch statement
<?php
$day = intval($_GET['day']);
if($day >0 && $day <8) {
include('day' . $day . '.php');
} else {
echo 'Invalid page';
}
?> |
Forum: PHP Feb 20th, 2009 |
| Replies: 6 Views: 755 Firstly, this should be in the HTML forum, secondly
<img height="32" width="32" src="blah.jpg />
... ... |
Forum: PHP Dec 4th, 2008 |
| Replies: 6 Views: 1,144 Aside from what they've said about validation just remove the quotes around the variable. Variables inside '' aren't parsed out so you won't get anything but that string. Either use "" or none at all... |
Forum: PHP Nov 22nd, 2008 |
| Replies: 10 Views: 1,669 3 "words": Facebook, Yahoo, and a little one called Wikipedia (MediaWiki) |
Forum: PHP Nov 22nd, 2008 |
| Replies: 2 Views: 1,628 Built-in function for php http://php.net/wordwrap |
Forum: PHP Nov 1st, 2008 |
| Replies: 13 Views: 2,061 Just in case you hadn't fixed it yet, (\d{2}\-){2}\d{4} is the correct regular expression. for 12-34-5678 format. To correctly write a regular expression you have to know exactly what your input must... |
Forum: PHP Aug 14th, 2008 |
| Replies: 4 Views: 2,133 The super keyword, to my understanding would be used with this syntax in php
parent::someFunc(); |
Forum: PHP Mar 10th, 2008 |
| Replies: 2 Views: 472 It's called the arrow operator, and when using it you don't prepend the member with $, ie.,
class SomeClass{
private $blah = "Hello";
function getBlah(){return $this->blah;}
function... |
Forum: PHP Dec 19th, 2007 |
| Replies: 10 Views: 1,458 Depending on whether you are Linux or windows. Windows has the WAMP stack www.wampserver.com/en/ if you are Linux there is the LAMP stack http://www.mysql-apache-php.com/ |
Forum: PHP Nov 21st, 2007 |
| Replies: 10 Views: 2,110 |