
DarkSuperHero
Members-
Posts
342 -
Joined
-
Last visited
About DarkSuperHero
- Birthday 02/03/1980
Contact Methods
-
AIM
DarkSuperHero
-
Website URL
http://www.HTMLandPHP.com
Profile Information
-
Gender
Male
-
Location
California
DarkSuperHero's Achievements

Newbie (1/5)
0
Reputation
-
Your code is littered with extra empty else statements....try to make your code easier to read, it makes it easier for people to want to help.... Looks like you may have figured out your problem.... No changes to your original code other than cosmetic <?php $staffQuery = mysqli_query($staffConnected, "SELECT `name`, `email`, `department`, `position` FROM `staff` WHERE `class`=2 ORDER BY `department`, `name` ASC") if($staffQuery){ $rowNum=1; $cellNum=0; $amountOfStaffReturned=mysqli_num_rows($staffQuery); if($amountOfStaffReturned>0){ $departmentHeader=false; $content.='<div class="emailHeader">Staff Contacts</div>'; while($staff=mysqli_fetch_array($staffQuery, MYSQLI_ASSOC)) { $staffName=$staff['name']; $staffEmail=$staff['email']; $staffDepartment=$staff['department']; $staffPosition=$staff['position']; $rowName=rowName($rowNum); if($rowNum>1){ $rowEmailClassAdd=' emailRow'; } else { $rowEmailClassAdd=''; } if($cellNum%2==0){ if($departmentHeader!=$staffDepartment) { $content.='<div class="departmentHeader">'.$staffDepartment.'</div>'; $departmentHeader=$staffDepartment; } if($cellNum != 0){ $content.='</div>'; } $content.='<div class="overflowclear'.$rowEmailClassAdd.'" id="emailStaff'.ucfirst($rowName).'Row">'; $rowNum++; } $content .='<div class="emailCell"> <div class="emailTitle">'.$staffName.'</div> <div class="emailSubTitle">'.$staffPosition.'</div> <div><a class="contactemail" href="mailto:'.$staffEmail.'">'.escapeemail($staffEmail).'</a></div> </div>'; if($amountOfStaffReturned%2 != 0 && $cellNum+1 == $amountOfStaffReturned) { $content.='<div class="emailCell"> </div> </div>'; } $cellNum++; } //end while } }
-
<?php $pizzaS['slice1']='meat'; $pizzaS['slice2']='meat'; $pizzaS['slice3']='meat'; $pizzaS['slice4']='veg'; $pizzaS['slice5']='veg'; $pizzaS['slice6']='veg'; $pizzaS['slice7']='veg'; $pizzaS['slice8']='meat'; foreach($pizzaS as $key=>$value){ if($value== "meat"){ // This line needed to have `meat` in quotes echo "I'll take that slice<br/>"; } else { echo "You can have that one<br/>"; } } //original snippet missing closing brace ?>
-
datePieces = explode("2010-01-02", "-"); dateDesired = datePieces[2] .".".datePieces[1] .".".datePieces[0] ."."; echo(dateDesired); Something of that sort should do the trick also
-
Funny Stuff...
-
questions about the path of a php programmer
DarkSuperHero replied to talper's topic in Miscellaneous
I must say I agree with this and other thing said here also, at the moment, Im teamed up with a designer who creates the clients vision, and I bring it to life through PHP/HTML/CSS and sometimes flash... its definitely important to be able to do more than just one thing.... Going on what Dj Kat said, what is the motivation that you hold for learning PHP ? I recall my very first attempt at PHP was because I hated having to hardcode all the pages in HTML...hahahaha...although it soon evolved into much more... :-) -
since this is more of js problem whats the gerated source look like after php's been parsed and all the variables have been echoed?
-
im very lost in the code, Are you using jQuery? php? plain javascript with method you created?
-
questions about the path of a php programmer
DarkSuperHero replied to talper's topic in Miscellaneous
I agreee with chmpdog, PHP is practically Best friends for life with HTML, although it can do without it, the only reason someone would need to hire a php person, would be to use them on a project based for the web. Unless your doing programming from scratch like building a framework ect. your going to need some HTML knoledge, since sometimes they can both be mixed in depending on the programmers style... -
think of it this way.... PHP FILE 1 RUN RUN RUN RUN PHP FILE 2 INCLUDED RUN RUN RUN BACKTO FILE 1 RUN RUN RUN RUN RUN EOF; hope that small diagram makes you see something, but that how php includes work...is that what your looking for ???
-
div#container { margin-left: 50px; margin-right: 50px; margin-top: 50px; } div#header { margin-right: 0px; background-color: #CCC; } div#header p { padding: 0px; text-align: right; padding-right: 5px; } div#header p a { color: #a00000; text-decoration: none; } div#header p a:hover { color: #000; text-decoration: underline; } #content { float:right; width:82%; paddin-left:15px; margin-top: 15px; min-width:600px; background-color: #CCC; padding:0px; } div#nav { float:left; text-align: left; width: 15%; min-width:200px; background-color: #CCC; margin-top: 15px; padding:0px; } div#nav a { color: #a00000; text-decoration: none; } div#nav a:hover { color: #000000; text-decoration: underline; } div#nav h3 { padding-top: 0px; margin-top: 0px; padding-bottom: 3px; margin-bottom: 3px; } a { color: #a00000; text-decoration: none; } a:hover { color: #000; text-decoration: underline; } try that out, although it might not be exctly what your looking for....i would suggest looking into positioning things absolutly....and the page it too wide on my screen.... 1600pixels wide...so i would prolly not stay on your page too long if it was a done site...
-
<?=$minpay?> to '. $minpay .' Read up on some syntax, specially concatenating and single vs double quotes
-
very common mistake, I did not know what .net was till i began picking up c#... Anyways on topic... How about how PHP has transformed and the direction it might be heading PHP-GTK ? i donno.. What about php intrest you the most?
-
Why do you say that ?
-
also, you could remove the login check if you want it to appear the same to all user i suppose...
-
works fine for me on chrome(MORE OF A ZOOM rather than a text enlarge) and IE6 (ie6 text doesnt change size)... What browser are you using ?