TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 12-23-2008, 02:11 AM   #21 (permalink)
The Contributor
 
Join Date: Oct 2008
Posts: 75
Thanks: 4
9three is on a distinguished road
Default

Quote:
Originally Posted by Tanax View Post
Yes you can use the same variable name on all functions.
However, there already is a function called "stripslashes" for example, and you cannot use the same name as an already existing function. I would suggest you to "merge" the 2 functions to a function called something like "secure".

I also thought about something in your updated code. You don't actually check if the connection succeeded, so I would suggest you to do something like
PHP Code:
if($this->link//meaning the connection returned true..
{
return 
true;
}
else return 
false
and put that in your connect function for a better structure and errorclearing.

I had a question about the return true and false.

If it returns true, to my understanding, the code executes.

If it returns false, does it return an error? A blank page?
9three is offline  
Reply With Quote
Old 12-23-2008, 04:39 AM   #22 (permalink)
The Addict
 
CoryMathews's Avatar
 
Join Date: Nov 2007
Location: USA
Posts: 256
Thanks: 7
CoryMathews is on a distinguished road
Default

If it returns false then the connection didn't happen it will only cause an error if you try to use the connection say to make a query or anything. So odds are yes you will get an error msg but not until you try to use the connection, or if you have errors off then a blank screen.
CoryMathews is offline  
Reply With Quote
Old 12-23-2008, 04:50 AM   #23 (permalink)
The Contributor
 
Join Date: Oct 2008
Posts: 75
Thanks: 4
9three is on a distinguished road
Default

Would you say that it would be better out of development to use return or die('Error Msg') for error handling?
9three is offline  
Reply With Quote
Old 12-23-2008, 09:09 PM   #24 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Quote:
Originally Posted by 9three View Post
I had a question about the return true and false.

If it returns true, to my understanding, the code executes.

If it returns false, does it return an error? A blank page?
When you use the function:
PHP Code:
$result $class->function();
if(
$result//meaning if the function returned true
{
     
//do whatever you want
}
else
{
     
//echo out an error that the function returned false..

The return false does not actually return an error IN ITSELF. You will have to run a check in your controller if it returned true or false, and THEN write an errormsg.

Quote:
Originally Posted by 9three View Post
Would you say that it would be better out of development to use return or die('Error Msg') for error handling?
Never use die in a class. Return false, or throw exception.
In controller, you can use die.

Again; just my opinion!
__________________
Tanax is offline  
Reply With Quote
Old 10-18-2012, 01:53 PM   #25 (permalink)
The Addict
 
Join Date: Oct 2012
Posts: 244
Thanks: 0
dashixiong is on a distinguished road
Default

Some conservatives have Coach Factory Outlet pushed that critique further, saying that Mr. Obama’s policies are too costly, often assist the wrong people Louis Vuitton Belts and could have the paradoxical effect of driving up college costs. The dispute turns not just on different Coach Factory Outlet assessments of how policies play out, but on differing philosophical views about the role of government. During Gucci Belts his time in office, Mr. Obama has sharply increased aid to low- and middle-income students, notably through the Pell Grant Coach Factory Outlet program, which grew from $14.6 billion given to 6 million students in 2008, to nearly $40 billion for Coach Factory Outlet almost 10 million students this year. His administration also made it easier to request aid, shortening the Coach Factory Online complex federal application and allowing people to transfer their financial information electronically from the Internal Coach Outlet Online Revenue Service database. But while many education experts laud his efforts, analysts of varying political Coach Outlet Online stripes have also questioned how much impact some of the president’s policies will have, noting that the prices Coach Online Outlet charged by colleges, and student borrowing, continue to climb.But behind the headlines about soaring costs, the Coach Factory Outlet Online reality is more complex and wildly uneven, because a growing number of students receive Coach Outlet Online financial aid, and only relatively high-income families pay those fast-rising sticker prices. Adjusted for Coach Factory Online inflation, the College Board calculates, the average net price changed little over the last decade at private Coach Factory Outlet schools, and rose only modestly at public ones.Defending federal spending, Arne Duncan, the secretary of Hermes Belts education, said that for more than 30 years, college prices had risen even when federal aid had not, leading him to believe Coach Factory Online there was zero correlation.
dashixiong is offline  
Reply With Quote
Old 10-22-2012, 09:22 AM   #26 (permalink)
The Addict
 
Join Date: Oct 2012
Posts: 244
Thanks: 0
dashixiong is on a distinguished road
Default Coach Outlet

You’ve relativelyCoach Outlet recently arrived in New Delhi after living in two of Asia’s other great cities,Coach Outlet Store Online Tokyo and Hong Kong, for several years. Do these cities feel like they’re part of the same continent? Yes, and no. In terms Coach Factory Onlineof infrastructure, they couldn’t be more different. Getting regularCoach Outlet power and water at my house in New Delhi is never a sure thing, even though Coach Purse Outlet OnlineI’m paying the same rent that I paid in Tokyo and almost the same electricity prices. Both Hong Kong and Tokyo are also crowded places,Coach Factory Outlet Online but both cities are incredibly well planned and efficiently run. Efficient is not a word I would use to describe my Coach Bags Outlet Onlineday-to-day life in New Delhi. On the other hand, one thing that I think Hong Kong and New Delhi have in common isCoach Handbags Outlet a shared sense of optimism — a feeling that the best is yet to come. That’s definitely not the feeling you get in Tokyo,Coach Outlet Online or in the U.S. when I go home. It’s a big part of what I find addictive about living and working in this part of the world. You feel like you’re watching the future unfold.
dashixiong is offline  
Reply With Quote
Old 11-16-2012, 11:36 AM   #27 (permalink)
The Addict
 
Join Date: Nov 2012
Posts: 331
Thanks: 0
shui1880 is on a distinguished road
Default

Need some cool and refreshing water http://www.drdreheadphones-sale.net fun this summer to beat the heat in Georgia? We have just what you are looking for! Tubing, kayaking, water slide, hot tub cabins, Dr Dre Headphones and indoor & outdoor swimming pools are waiting for you all in one spectacular location at the Coosawattee River Resort in Ellijay. Whether the excitement of dr dre beats
a monster water slide Dr Dre Beats or the relaxation of a float down the Coosawattee River, we have the way for you to soothe that sweltering summer sizzle.
shui1880 is offline  
Reply With Quote
Old 01-29-2013, 12:28 PM   #28 (permalink)
The Addict
 
Join Date: Oct 2012
Posts: 244
Thanks: 0
dashixiong is on a distinguished road
Default

Organizers said Coach Outlet Online was opportune because the battle’s 150-year anniversary is in December, and Fredericksburg Coach Factory Outlet has been preparing to mark the sesquicentennial. in the new agreement is that Coach Outlet Online revolutionary councils from 14 Syrian provinces now each have a representative, though not all live Coach Online Outlet in Syria. The hope is that will bind the coalition to those inside the country. Perhaps Coach Bags Outlet the most important body the new group is expected to form is a Revolutionary Military Council Coach Factory Online to oversee the splintered fighting organizations and to funnel both lethal and nonlethal Coach Factory Outlet military aid to the rebels. It should unite units of the Free Syrian Army, various militias Coach Outlet Store Online and brigades in each city and large groups of defectors. Before the ink was even dry on the Coach Outlet Store final draft, negotiators hoped that it would bring them the antiaircraft missiles they crave to Coach Factory Stores take on the Syrian Air Force. The United States and Britain have offered only Coach Handbags Outlet nonmilitary aid to the uprising. A similar attempt by the Syrian National Council to Coach Factory Store supervise the military never jelled. Organizers said funding was too haphazard. Eventually foreign Coach Factory Online governments like Qatar and Saudi Arabia, which are financing and arming the rebels, found Coach Factory Online their own favorite factions to deal with. Foreign leaders notably including Secretary of State Coach Outlet Hillary Rodham Clinton urged this unification largely so they could coordinate their Coach Factory Outlet efforts and aid through a group of technocrats. Once it receives international recognition, the Coach Outlet Store Online coalition is supposed to establish a temporary Coach Outlet Online military never jelled.
dashixiong is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy to Modify Login Script with Hierarchical User Permissions and XML Account File Wildhoney Script Giveaway 4 05-04-2011 06:11 AM
Help: Php User Messenger system with ajax tego10122 Advanced PHP Programming 2 10-01-2008 11:42 AM
User profile page h0ly lag General 2 05-08-2008 08:53 PM
Highly secure login system ReSpawN Advanced PHP Programming 6 12-12-2007 08:28 PM
User system Swordbeta Script Giveaway 4 12-04-2007 10:45 PM


All times are GMT. The time now is 02:08 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design