NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Last PHP Question - I promise

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
4 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 05-27-2006, 03:34 PM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Aug 2005
Location: Leeds, UK
Posts: 263
noswad is an unknown quantity at this point
 



Last PHP Question - I promise


Hi.

I have one last final problem with PHP sessions.

Please take a look at the attached small screen shot. Each session is called [game1] all the way down to game20]

If the database is full for all sessions except [game8] users will see a blank line where [game8] should be.

Is there anyway to move [game9] up one line to prevent the blank space?

Also, as a rule of thumb, I would need such a script to ignore any blank sessions and move all the full lines towards the top.

Thanks VERY much for reading. I promise this is my last question
????: NamePros.com http://www.namepros.com/programming/201760-last-php-question-i-promise.html

David.
Attached Images
File Type: jpg php_srceen_grab.jpg (22.5 KB, 14 views)
__________________
Michael McIntyre - Fan site for the super funny UK comedian Michael McIntyre
noswad is offline  
Old 05-27-2006, 03:56 PM   #2 (permalink)
Resistance is Futile
 
Kadenz's Avatar
Join Date: Apr 2006
Location: Montreal, Canada
Posts: 1,094
Kadenz is a name known to allKadenz is a name known to allKadenz is a name known to allKadenz is a name known to allKadenz is a name known to allKadenz is a name known to all
 



Wildlife Lou Gehrig's Disease (ALS)
You Should probalbly use this instead:
Code:
$detect = mysql_query("select `field` from `table` LIMIT 0, 20");
while ($row = mysql_fetch_array($detect, MYSQL_BOTH)) {
   printf("%s", $row[0]); 
}
or at least this is what I think you're trying to do.
__________________
Freelance Web Developer
PHP, MySQL, XHTML, CSS, Javascript, jQuery, Wordpress
Portfolio: www.bundy.ca
Kadenz is offline  
Old 05-27-2006, 04:29 PM THREAD STARTER               #3 (permalink)
NamePros Regular
Join Date: Aug 2005
Location: Leeds, UK
Posts: 263
noswad is an unknown quantity at this point
 



Hi

You have confused me there lol.

Im just looking for a simple script that will ignore blank fields and move the next field containing data upwards to prevent users seeing blank lines on pages.

Thanks for trying though.
__________________
Michael McIntyre - Fan site for the super funny UK comedian Michael McIntyre
noswad is offline  
Old 05-27-2006, 04:38 PM   #4 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,792
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
 


Autism Autism Autism Autism Autism Autism Autism
PHP Code:
for ($i 1$i <= 20$i++) {
????: NamePros.com http://www.namepros.com/showthread.php?t=201760
  if (
$_SESSION['game'.$i]) {
    echo 
$_SESSION['game'.$i];

Displays the game if it is not blank.
Dan is offline  
Old 05-27-2006, 04:48 PM THREAD STARTER               #5 (permalink)
NamePros Regular
Join Date: Aug 2005
Location: Leeds, UK
Posts: 263
noswad is an unknown quantity at this point
 



Hi Dan

The page is displaying...

"Parse error: parse error, unexpected $ in /homepages/33/d149588437/htdocs/test.php on line 16"

Thanks for trying
__________________
Michael McIntyre - Fan site for the super funny UK comedian Michael McIntyre
noswad is offline  
Old 05-27-2006, 06:16 PM   #6 (permalink)
NamePros Member
 
xemiterx's Avatar
Join Date: Dec 2003
Location: Oregon
Posts: 110
xemiterx is on a distinguished road
 



with one more } at the end of the code from Dan it should work.
xemiterx is offline  
Closed Thread


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


 
All times are GMT -7. The time now is 02:14 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger