₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,005 members, 8,419,894 topics. Date: Thursday, 04 June 2026 at 06:41 AM

Toggle theme

Quadrillio's Posts

Nairaland ForumQuadrillio's ProfileQuadrillio's Posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 (of 25 pages)

WebmastersRe: Get A Website At An Affordable Rate This Season by quadrillio(m): 3:29pm On Dec 02, 2009
that is what u get for 6k. shocked shocked shocked shocked shocked
WebmastersRe: Php Class For Beginners. Question Will Be Treated With High Priority. by quadrillio(op): 4:43pm On Nov 30, 2009
Guys, am seriously busy on a project,

BRB.
WebmastersRe: Quick Javascript Pop Quiz by quadrillio(m): 1:21pm On Nov 25, 2009
DHTML, is not a cheat, he's just smart.

yawa-ti-de:
The above implies inside trading and in some countries, you, like bernie maddoff, would go to jail for a long time tongue
grin grin grin grin grin
WebmastersRe: Are Nigerian Webmasters Really Lazy? by quadrillio(m): 1:39pm On Nov 23, 2009
ogzille:
I was going thru some naija sites and i realized that a lot of our websites are ugly and lack originality. 75% of the sites i visited were templated (ugly templates).
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:
You as a webmaster, are u doing great or are you just spreading the ugly trend?

Have u ever taken time to do a website from scratch?
Have u taken time to learn your basic html and css?
Have you tried to learn how spry (or some other widgets) work?
have you ever tried creating your own content management system?
Have u ever embedded your original efficient chat application or other applications to blend with your site?
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
WebmastersRe: Php Class For Beginners. Question Will Be Treated With High Priority. by quadrillio(op): 4:17pm On Nov 19, 2009
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;
}
}
WebmastersRe: Php Quiz by quadrillio(m): 11:58am On Nov 18, 2009
big mo:
I would like to design a website with an online mutiple choice quiz which will display passmark to the user. The quiz will aslo be timed. Can any body help with this task?
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.
WebmastersRe: Php Class For Beginners. Question Will Be Treated With High Priority. by quadrillio(op): 4:33pm On Nov 17, 2009
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
Tech JobsRe: Php And Mysql Guru Needed by quadrillio(m): 10:19am On Nov 17, 2009
wus:
anyone in the house who can take a person that has knowledge about php and mysql deeply for one day final touch pls drop your contact.
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.
WebmastersRe: Php Class For Beginners. Question Will Be Treated With High Priority. by quadrillio(op): 8:57am On Nov 17, 2009
@ruudie, can I continue d class now?
hope u ve find your way round it?


d class starts now,
SportsRe: A World Cup Without The National Stadium by quadrillio(m): 11:42am On Nov 11, 2009
tosh_acer:
see Psychos

so because it has not been done in America or London, then it is a bad idea?
u dey mind dem, na only photocopy dem like

must does people colonize us in everthing.
WebmastersRe: Php Class For Beginners. Question Will Be Treated With High Priority. by quadrillio(op): 9:58am On Nov 11, 2009
*dhtml:
just strolling by. . .
we're together
Tech JobsRe: Experienced Web Programmer Needed by quadrillio(m): 11:13am On Nov 09, 2009
let's talk on my YM quadri20_wale

SAFE
WebmastersRe: Php Class For Beginners. Question Will Be Treated With High Priority. by quadrillio(op): 9:54am On Nov 09, 2009
latbabs:
i asked for generating number and i will like it if u can give me the two, but i need the one for pin. so make it fast,
Is this an ORDER or a REQUEST?


RuuDie:
@ quadrillo,
hey man, plenty thanx. the script worked - found the error i'd made that stopped it from working right.
but i still have cannot input those values into my database - please help me review the codes i posted earlier abeg!
am takin my time to review ur code. will post back back d edited version later.

maranro:
thanks quadri 4 d class. Pls i want 2 learn web design and development. Lets discuss my mail is abey232000@hotmail.com
later.

D class will continues,

SAFE.
WebmastersRe: Php Class For Beginners. Question Will Be Treated With High Priority. by quadrillio(op): 3:28pm On Nov 04, 2009
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 sad.

?>



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.
WebmastersRe: Php Class For Beginners. Question Will Be Treated With High Priority. by quadrillio(op): 11:56am On Nov 04, 2009
RuuDie:
tried and failed again. . .  this getting depressing!
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:
Don't get depressed just yet.  Remember, you aren't alone in this battle.
yes, we solidly behind u.
WebmastersRe: Php Class For Beginners. Question Will Be Treated With High Priority. by quadrillio(op): 1:01pm On Nov 02, 2009
I believe enough people are learning here wit dis. please bring more.

@yawa, everyone thanks

@ruudie, u almost there.
RomanceRe: Describe The One You Love In One Sentence by quadrillio(m): 9:28am On Oct 29, 2009
soulmate
WebmastersRe: Php Class For Beginners. Question Will Be Treated With High Priority. by quadrillio(op): 9:13am On Oct 29, 2009
*dhtml:
qadri, i saw your missed call earlier. i was knocked out flat then.
I'll call later. jus want to clear something.

@ruudie

kip us posted on d progress. thanks
SportsRe: Nigeria Vs Argentina (2 - 1): U-17 World Cup (Nigeria '09) by quadrillio(m): 9:03am On Oct 29, 2009
paddyboi:
Nigeria, but why are we playing in bauchihuh, whats up with that,
because, last group matches are played simultaneously,

so while Nigeria is playing

Honduras are also battling it out with Germany.
SportsRe: Nigeria Vs Honduras: 1 - 0 (U-17 World Cup) by quadrillio(m): 9:41am On Oct 26, 2009
Emperoh:
We will lose this. . . . . . it doesn't rain everyday!!
as if we ve been winning everyday.
WebmastersRe: Php Class For Beginners. Question Will Be Treated With High Priority. by quadrillio(op): 11:43am On Oct 22, 2009
cartoon1b:
pls and pls can someone out there help on how i can install script on the server can anyone out there teach me that,with step by step picture guide, what and what that i have to do first before, and what and what that i need to do first
here is my email robhilson24@rediff.com
the script is php

actually will be hoping to hear from you soon
to all webmasters
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
WebmastersRe: Nigeria Police Force "website" by quadrillio(m): 2:44pm On Oct 20, 2009
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
WebmastersRe: Who Is Deleting My Post by quadrillio(m): 3:47pm On Oct 19, 2009
yawa-ti-de:
webmaster board is losing out on quality posts because of this.
Exactly, u won't believe how many of my post is deleted in my PHP tutorial thread.

MrCrackles:
^ Satan deleted it
HABA, is he dat Jobless. LOL
WebmastersRe: Php Class For Beginners. Question Will Be Treated With High Priority. by quadrillio(op): 11:21am On Oct 19, 2009
latbabs:
i need the code to generate numbers using Php
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)
WebmastersRe: Php Class For Beginners. Question Will Be Treated With High Priority. by quadrillio(op): 10:29am On Oct 16, 2009
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
WebmastersRe: Yawa-ti-de, Omnipotent And Dhtml: by quadrillio(m): 1:36pm On Oct 15, 2009
though am not listed,but I don't think is a crime If I help.

yawa-ti-de:
Your path for learning (in this order): html, css, javascript, php (or jsp or whatever back end language you want to learn).

Good luck to you and please report back to us.
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.
WebmastersRe: Php Class For Beginners. Question Will Be Treated With High Priority. by quadrillio(op): 7:43pm On Oct 11, 2009
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.
European Football (EPL, UEFA, La Liga)Re: Barcelona Fans Thread. by quadrillio(m): 12:47pm On Oct 09, 2009
eyonigger:
People, next match is on the 17th, too far from now, what match is on queue before then?
I can't wait. Barca 4ever
WebmastersRe: Moderator U De Bif Me? by quadrillio(m): 4:22pm On Oct 08, 2009
your username is admin, dat is d default username

and yes d password is d one u entered during installation.

SAFE
WebmastersRe: Php Class For Beginners. Question Will Be Treated With High Priority. by quadrillio(op): 1:53pm On Sep 30, 2009
zikclassiq:
php seems more difficult than html, or what do u tink? Anyway, [nairalist+s] are going to a blog to sign up for their free ipods and phones. Why dnt u get your too! Http://chooseurfreegift..com
guy, I don know ur aim but u should look elsewhere abi u need cane.
WebmastersRe: Session Management Vs Session Hijacking by quadrillio(m): 8:21pm On Sep 27, 2009
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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 (of 25 pages)