Quadrillio's Posts
Nairaland Forum › Quadrillio's Profile › Quadrillio's Posts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 (of 25 pages)
that is what u get for 6k. |
Guys, am seriously busy on a project, BRB. |
DHTML, is not a cheat, he's just smart. yawa-ti-de: ![]() |
ogzille:from experience, I can bet u that 70% of the 75%, was done for as low as 20k(hosting inclusive). Cheap labour Clients low taste. ogzille:Yes to all. I bet you that anyone dat can say yes to at least three of d above will not fall within those that design does HANDBILL, they called WEBSITE. - SAFE |
Object-Oriented PHP PHP can, if you want, be written in an object-oriented (OO) fashion. In PHP5 & 6, the OO functionality of the language has been enhanced considerably. If you are familiar with other OO languages, such as C++ or Java, you may prefer the OO approach to programming PHP, whereas if you are used to other procedural languages, you may not want to use objects at all. There are, after all, many ways to solve the same problem. If you are new to programming as well as to PHP, you probably have no strong feelings either way just yet. It's certainly true that OO concepts are easier to grasp. The aim of this lesson is to introduce how a class is created and referenced in PHP so that if you have a preference for using objects, you can begin to develop scripts by using OO methods. Most importantly, however, you will be able to pick up and use some of the many freely available third-party class libraries that are available for PHP from resources such as those at phpclasses What Is a Class? A class is the template structure that defines an object. It can contain functionsalso known as class methodsand variablesalso known as class properties or attributes. Each class consists of a set of PHP statements that define how to perform a task or set of tasks that you want to repeat frequently. The class can contain private methods, which are only used internally to perform the class's functions, and public methods, which you can use to interface with the class. A good class hides its inner workings and includes only the public methods that are required to provide a simple interface to its functionality. If you bundle complex blocks of programming into a class, any script that uses that class does not need to worry about exactly how a particular operation is performed. All that is required is knowledge of the class's public methods. Because there are many freely available third-party classes for PHP, in many situations, you need not waste time implementing a feature in PHP that is already freely available. When to Use Classes At first, there may not appear to be any real advantage in using a class over using functions that have been modularized into an include file. OO is not necessarily a better approach to programming; rather, it is a different way of thinking. Whether you choose to develop your own classes is a matter of preference. One of the advantages of OO programming is that it can allow your code to scale into very large projects easily. In OO programming, a class can inherit the properties of another and extend it; this means that functionality that has already been developed can be reused and adapted to fit a particular situation. This is called inheritance, and it is a key feature of OO development. When you have completed this book, if you are interested in learning more about OO programming, take a look at Sams Teach Yourself Object-Oriented Programming in 21 Days by Anthony Sintes. What a Class Looks Like A class is a grouping of various functions and variablesand that is exactly how it looks when written in PHP. A class definition looks very similar to a function definition; it begins with the keyword class and an identifier, followed by the class definition, contained in a pair of curly brackets ({}). The following is a trivial example of a class to show how a class looks. This example contains just one property, myValue, and one method, myMethod (which does nothing): class myClass { var $myValue; function myMethod() { return 0; } } |
big mo:Do you want it done from scratch or you've done it to a stage and want an explanation further or what? try as much as possible to make yourself a bit clearer. |
next in d class,we'll be introducing ourselves to OOP in PHP OOP meaning, Object Oriented Programming where we'll also learn about d different types of Design patterns and others. - Safe |
wus:am trying to understand above text, cos I find it hard to see a final touch in programming, you keep on fine-tuning, day-in day-out. am sure u know what u want. SAFE. |
@ruudie, can I continue d class now? hope u ve find your way round it? d class starts now, |
tosh_acer:u dey mind dem, na only photocopy dem like must does people colonize us in everthing. |
*dhtml:we're together |
let's talk on my YM quadri20_wale SAFE |
latbabs:Is this an ORDER or a REQUEST? RuuDie:am takin my time to review ur code. will post back back d edited version later. maranro:later. D class will continues, SAFE. |
I decided to dedicate like 30min of my time to search around and put up dis tutorial. cos I think many are watching and learning. this a script dat upload an image to a dir, and also show u ow to retrieve it for display. LET'S START first, your form to choose d image to upload <form action="./upload.php" method="post" enctype="multipart/form-data"> <p> <label for="file">Select a file:</label> <input type="file" name="userfile" id="file"> <button>Upload File</button> <p> </form> dis is to create a form and link to a file named:"upload.php" to process it. Secondly, write d script to process d image. This will check that the file upload is safe by setting a list of allowed filetypes and disallowing all other file uploads. This will prevent people from uploading malicious files. Then we will check the filesize to prevent large files from being uploaded. <?php // Configuration - Your Options $allowed_filetypes = array('.jpg','.gif','.bmp','.png'); // These will be the types of file that will pass the validation. $max_filesize = 524288; // Maximum filesize in BYTES (currently 0.5MB). $upload_path = './files/'; // The place the files will be uploaded to (currently a 'files' directory). $filename = $_FILES['userfile']['name']; // Get the name of the file (including file extension). $ext = substr($filename, strpos($filename,'.'), strlen($filename)-1); // Get the extension from the filename. // Check if the filetype is allowed, if not DIE and inform the user. if(!in_array($ext,$allowed_filetypes)) die('The file you attempted to upload is not allowed.'); // Now check the filesize, if it is too large then DIE and inform the user. if(filesize($_FILES['userfile']['tmp_name']) > $max_filesize) die('The file you attempted to upload is too large.'); // Check if we can upload to the specified path, if not DIE and inform the user. if(!is_writable($upload_path)) die('You cannot upload to the specified directory, please CHMOD it to 777.'); // Upload the file to your specified path. if(move_uploaded_file($_FILES['userfile']['tmp_name'],$upload_path . $filename)) echo 'Your file upload was successful, view the file <a href="' . $upload_path . $filename . '" title="Your File">here</a>'; // It worked. else echo 'There was an error during the file upload. Please try again.'; // It failed .?> there u go, suitable upload script please NOTE that by default PHP will not handle file uploads larger than 2MB, if you require PHP to handle larger files then you must first set upload_max_filesize and post_max_size in your php.ini file to be larger than 2MB. I hope dis helps. SAFE. |
RuuDie:dont get depressed, like yawaytide said "Coding is serious business, " jus try out d other steps, there's no victory in trying and failing, victory comes when u succeed. so far, yawatide's steps are dbest for you so don't loose focus. yawa-ti-de:yes, we solidly behind u. |
I believe enough people are learning here wit dis. please bring more. @yawa, everyone thanks @ruudie, u almost there. |
soulmate |
*dhtml:I'll call later. jus want to clear something. @ruudie kip us posted on d progress. thanks |
paddyboi:because, last group matches are played simultaneously, so while Nigeria is playing Honduras are also battling it out with Germany. |
Emperoh:as if we ve been winning everyday. |
cartoon1b:actually everyone loves to help u but u ve to be more specific on wat u want. which script are u trying to install. every scripts has different way u will install dem. so please for d sake of urself and people dat wants to help you. make your question a bit clearer |
To be sincere with am not disappointed, It's only you people that were expecting much got disappointed. My problem is not d amount they collected for all this project. my problem is d quality of job they give after collecting all d millions. I knew when they wanted it but never knew when it's was done. I don't want to say much. d last thing I want now is a police wahala. SAFE |
yawa-ti-de:Exactly, u won't believe how many of my post is deleted in my PHP tutorial thread. MrCrackles:HABA, is he dat Jobless. LOL |
latbabs:you ve to be specific with your question, What type of numbers are u generating? (i.e. what do you want to use it for. e.g. PIN, SERIAL e.t.c) |
I prefer to chat, so that I can take u a step by step process. but since u decided to drop ur mail instead I am still workin on a tutorial for u, (if u can wait sha) so, it not like u were ignored. If u still need to chat my yahoo IM is quadri20_wale, or call 08077796668 SAFE |
though am not listed,but I don't think is a crime If I help. yawa-ti-de:Please follow dis instructions, don't jump to dreamweaver or frontpage like others.(i.e. If u want to go far) am always in Osogbo, If u ran into any issue u can buzz me on my yahoo IM quadri20_wale of give me a call. 08077796668. Dat is d closest link I know of. |
Welcome Back, sorry for d long break, Too many deadline to meet up wit. In this lesson you will learn how to store, display, and manipulate date and time values in PHP. Date Formats PHP does not have a native date data type, so in order to store date values in a script, you must first decide on the best way to store these values. Do-It-Yourself Date Formats Although you often see dates written in a structured format, such as 05/03/1974 or 2001-12-31, these are not ideal formats for working with date values. However, the latter of these two is more suitable than the first because the order of its components is from most significant (the year) to the least significant (the day), so values can be compared using the usual PHP operators. As a string, 2002-01-01 is greater than 2001-12-31, but because comparisons are performed more efficiently on numbers than on strings, this could be written better as just 20020201, where the format is YYYYMMDD. This format can be extended to include a time portionagain, with the most significant elements firstas YYYYMMDDHHMMSS, for example. However, date arithmetic with this format is nearly impossible. While you can add one to 20040501, for instance, and find the next day in that month, simply adding one to 20030531 would result in a nonsense date of May 32. Unix Timestamp Format The Unix timestamp format is an integer representation of a date and time. It is a value that counts the number of seconds since midnight on January 1, 1970. The Unix Epoch A timestamp with integer value zero represents precisely midnight, Greenwich Mean Time (GMT), on January 1, 1970. This date is known as the Unix Epoch. Right now, we have a 10-digit date and time timestamp. To find the current timestamp, you use the time function: echo time(); The Unix timestamp format is useful because it is very easy to perform calculations on because you know that the value always represents a number of seconds. For example, you can just add 3,600 to a timestamp value to increase the time by one hour or add 86,400 to add one daybecause there are 3,600 seconds in an hour and 86,400 seconds in a day. One drawback, however, is that the Unix timestamp format cannot handle dates prior to 1970. Although some systems may be able to use a negative timestamp value to count backward from the Epoch, this behavior cannot be relied on. Timestamps are good for representing contemporary date values, but they may not always be suitable for handling dates of birth or dates of historical significance. You should consider what values you will be working with when deciding whether a timestamp is the correct format to use. Timestamp Limitations The maximum value of a Unix timestamp depends on the system's architecture. Most systems use a 32-bit integer to store a timestamp, making the latest time it can represent 3:14am on January 19, 2038. see you in d next class. |
eyonigger:I can't wait. Barca 4ever |
your username is admin, dat is d default username and yes d password is d one u entered during installation. SAFE |
zikclassiq:guy, I don know ur aim but u should look elsewhere abi u need cane. |
I can't believe I missed dis, anyway comment is neva too late 1, so far from projects handled, I think where u store it is not d problem but how u do it, reason is becos I have done more of saving it in a file than in a db, and I still feel safe either ways. jus to chip dis in, we webmaters should try not to attack each other here cos: 1, it not a competition, so no one will recieve an award as d best here. 2, Young Web Developers are looking at us, we don't need to make them believe dat attacking a fellow developer is d way to be d best 3, Sharing is d best way to learn. (that's d way I learnt all my life, BY SHARING KNOWLEDGE WITH OTHERS) SAFE |

.
, whats up with that,