[advanced search]
Results from the most recent live auction are here.
21 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Programming
User Name
Password

Old 05-27-2006, 04:34 PM   · #1
noswad
NamePros Regular
 
Location: Leeds, UK
Trader Rating: (1)
Join Date: Aug 2005
Posts: 260
NP$: 70.00 (Donate)
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

David.


Please register or log-in into NamePros to hide ads
Attached Images
File Type: jpg php_srceen_grab.jpg (22.5 KB, 14 views)
__________________
C905 - Sony Ericsson mobile phone with an 8 megapixel camera!
noswad is offline   Reply With Quote
Old 05-27-2006, 04:56 PM   · #2
Borghunter
Resistance is Futile
 
Borghunter's Avatar
 
Name: Mitchell
Location: Calgary, Canada
Trader Rating: (26)
Join Date: Apr 2006
Posts: 1,093
NP$: 232.05 (Donate)
Borghunter is a name known to allBorghunter is a name known to allBorghunter is a name known to allBorghunter is a name known to allBorghunter is a name known to allBorghunter is a name known to all
Wildlife
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.
__________________
████ Watch FREE Domain Names Videos by Gurus ████
The Best Check Page Rank
Borghunter is offline  
  Reply With Quote
Old 05-27-2006, 05:29 PM   · #3
noswad
NamePros Regular
 
Location: Leeds, UK
Trader Rating: (1)
Join Date: Aug 2005
Posts: 260
NP$: 70.00 (Donate)
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.
__________________
C905 - Sony Ericsson mobile phone with an 8 megapixel camera!
noswad is offline   Reply With Quote
Old 05-27-2006, 05:38 PM   · #4
Dan
Buy my domains.
 
Dan's Avatar
 
Name: Dan
Trader Rating: (63)
Join Date: Feb 2006
Posts: 2,801
NP$: 54.00 (Donate)
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++) {
  if (
$_SESSION['game'.$i]) {
    echo
$_SESSION['game'.$i];
}


Displays the game if it is not blank.
Dan is offline   Reply With Quote
Old 05-27-2006, 05:48 PM   · #5
noswad
NamePros Regular
 
Location: Leeds, UK
Trader Rating: (1)
Join Date: Aug 2005
Posts: 260
NP$: 70.00 (Donate)
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
__________________
C905 - Sony Ericsson mobile phone with an 8 megapixel camera!
noswad is offline   Reply With Quote
Old 05-27-2006, 07:16 PM   · #6
xemiterx
NamePros Member
 
xemiterx's Avatar
 
Name: Robert
Location: Oregon
Trader Rating: (8)
Join Date: Dec 2003
Posts: 110
NP$: 196.00 (Donate)
xemiterx is on a distinguished road
with one more } at the end of the code from Dan it should work.
xemiterx is offline   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

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
Forum Jump


Site Sponsors
Hunting Moon Proof is in the Parking EscrowDNS
Advertise your business at NamePros
All times are GMT -7. The time now is 10:22 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0