General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 16th, 2002, 12:33 AM
CHornJr's Avatar
CHornJr CHornJr is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: New York City
Posts: 236 CHornJr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 1 h 50 m 36 sec
Reputation Power: 7
Send a message via AIM to CHornJr Send a message via MSN to CHornJr Send a message via Yahoo to CHornJr
Exclamation in reference to "Building a Members Area" artical

First I apologize for posting this here as well as in the thread dedicated to the artical but I didn't get an answer to my last post in there so I also posted this here.
---------------------------------------------------------------------------------

After my last post, and cause of the fact that nobody posted any reply to it I decided to start it from scratch again. While doing the "GetData" function I noticed something unusaul in the code

PHP Code:
if($FieldNames[0] != ''
     
$s sizeof($FieldNames);
else
     
$s 0;
     
$s $s;
     for(
$i 0$i <= $s$i++)
     
$arrRet[] = ''


this if and else statement doesn't have "{" or "}" I am guessing that could be part of the cause of the error (if not the whole cause). But when I looked in the support files I noticed that the code didn't have the brackets either. Was this an error or am I just not as close to being an intermidete user of php as I thought I was

Joey
Attached Files
File Type: txt class.security.txt (7.5 KB, 207 views)

Reply With Quote
  #2  
Old November 16th, 2002, 06:41 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Is the code indented that way in the original file? If so, it may be the problem, as it seems that this if/else block would need the opening and closing braces; however, if the code is meant to be:

PHP Code:
if($FieldNames[0] != ''
     
$s sizeof($FieldNames);
else
     
$s 0;
$s $s;
for(
$i 0$i <= $s$i++)
     
$arrRet[] = ''


Then you wouldn't need the braces, as they are just single-line if/else statements. My suggestion would be to try placing the braces, and see if there are any immediate effects.
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
  #3  
Old November 17th, 2002, 04:17 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
PHP Code:
if($FieldNames[0] != ''
     
$s sizeof($FieldNames);
else
     
$s 0;
$s $s;
for(
$i 0$i <= $s$i++)
     
$arrRet[] = ''


when you only have one line on an if, else, while,for statment, you dont need the curley braces. So
PHP Code:
if($FieldNames[0] != ''
{
     
$s sizeof($FieldNames);


becomes
PHP Code:
if($FieldNames[0] != ''
     
$s sizeof($FieldNames); 

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > in reference to "Building a Members Area" artical


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT