-
Posts
411 -
Joined
-
Last visited
Never
Posts posted by Bendude14
-
-
try echoing $localDir out inside the loop before you try to open it, either you have the wrong path to the file or the wrong permissions on the file.
-
your yearTaken method should be public....
-
That is how you would use getters and setters but if everytime you create a CHFourInvest Object you will be setting $interest, $initial and $end then you should still be passing these into the constructor like you were before.
A constructors purpose is to initialise the object, "like a preparation stage".
getters and setters give you access to private data, in case you need to update the data or retrieve the data from the object later on.
You provide getters and setters because other people may not no how to edit your data correctly and should therefore use the methods provided.
Yes making a method private would only allow access to it from within the same class
Did you look at the php __set() and __get() will save you some time in the long run
-
try echoing the value of $nextUpdate to make sure it is in the same format as your $currentTime
-
can you post the code that calls this method also
createBackupDirs($sourceArr)
-
You do not want your constructor to be private or methods that you would like to use from outside of the class.
Google, access modifiers to learn a bit more about this.
You should set your data to private so it can only be accessed through getter and setter methods you create. Encapsulation is a key part of OO programming.
PHP has some "magic" methods you may want to look into
__get() and __set()
-
have you checked the HTML source code to see whats appearing?
you might need to use htmlentities when printing the data back to the page.
As for Global warming - Who cares lol?
as for Women the secret is to keep swapping the old out with the new, example
if($women['days']) < 7) { keepDating(); } else { findNewWomen("blonde", "bigtits"); }
Ben
-
if your array was called $info then simply use
$info['site'] = "myspace.com";
Since you have an array of sites you can use the array index first like so
$info[0]['site'];
Remeber arrays start from 0 so this would be your first array.
-
so you want the form to be sent when you hit the page?
What are you trying to achieve?
Do you intend to get the form data to be sent from the URL using GET?
-
can you not just link directly to the other image, if you had the image named with the correct id you could just do this, <img src="http://serverA.com/images/245.jpg" alt="" />
Ben
-
similar to the function i descripbed above.
"a program to allow me to password protect my scanner utility from been opened while it is running"
Any help would be appreciated, sorry for not making myself clear first time round
Ben
-
I repeat...post your new code so I can see what you changed...
-
Well after a few hours of searching I can not find a program to allow me to password protect my scanner utility from been opened while it is running.
Can anyone point me in the direction of creating an application to do something similar to this, Its a 3rd party app so can not get the source code.
Preffered language for doing this would be, VB.NET or C#
Thanks
Ben
-
why cast it to a control? can you not just use sender.Name?
-
post your new code so I can see what you changed...
-
I don't think the SSL should make a difference, The code seems to work fine for me in a little setup i just made...
How about trying
and
-
this line needed a double quote and a semi-colon
print "<h2>Stats Information:</h2>
print "<h2>Stats Information:</h2>";
-
does it say which line?
-
try using
if(isset($_POST['login'])){}
instead of if($_POST['submit'])
and use isset() on you logincheck as well.
Ben
-
They are using trim to make sure it is not set with whitespace only... What is it you are trying to do?
you would probaby be better with isset() or empty()
-
wouldn't this line set a cookie with either true or false on the clients machine, depending on wether or not the session started?
setcookie('aff_ses', session_start());
Shouldn't you been saving the session id on the clients machine?
session_start();
setcookie( 'aff_ses', session_id() );
-
The link you posted works fine for me in firefox... But if you are looking to move the page location after it has loaded you will need or be best with a javascript solution..
-
Using <a name=""> </a> should work as a jump to.
If the jump happens before the table is loaded what would that matter if the anchor was positioned above where the table was going to be located?
-
does your backup.sql file not contain the code to recreate the table? Try deleting the table you have made in the database (presuming its empty) and restore the backup from your file again.
Ben
[SOLVED] Is this code technically correct
in PHP Coding Help
Posted
personally i do like to write my get() and set() methods as I find myself writing a lot of java.
Here is a small intro to __get() and __set()
http://www.sunilb.com/php/php-tutorials/php5-oops-tutorial-__get-and-__set
As for the security issues, I am not aware of any.
Ben