Search found 147 matches

by Skoalbasher
Tue Feb 10, 2009 4:37 pm
Forum: PHP - Code
Topic: Add item to an array
Replies: 6
Views: 574

Re: Add item to an array

You can turn the $_SESSION variable into an array. That stays until the session times out. Would be exactly what you're looking for I believe.

Yeah, what the above poster said.. lol. I didn't see that he had posted already.
by Skoalbasher
Tue Feb 10, 2009 4:07 pm
Forum: PHP - Code
Topic: Make your results at pages
Replies: 1
Views: 155

Re: Make your results at pages

Hi again. What im trying to do see my results from a database with 1,2,3,4,5,6 i can see for start 20 results and stop if i wanna go on im gona need to press 2 to see the next 20 and so on also if i wanna go back and the the previous results to press the previus number buttons This was actualy just...
by Skoalbasher
Tue Feb 10, 2009 4:05 pm
Forum: PHP - Theory and Design
Topic: Graphs. Bar charts and Pie Charts
Replies: 3
Views: 790

Re: Graphs. Bar charts and Pie Charts

Eh! Cool thanks guys.
by Skoalbasher
Tue Feb 10, 2009 3:16 pm
Forum: PHP - Code
Topic: Generate static HTML from PHP/MySQL
Replies: 8
Views: 636

Re: Generate static HTML from PHP/MySQL

But.. they aren't the same. It's a different person on each page. I understand that it can be done. I really just don't see the point. If you want to delete a page, just delete the user from the DB. He doesn't show up in the list anymore and there's nothing else to be done. I mean, you're going to ...
by Skoalbasher
Tue Feb 10, 2009 2:22 pm
Forum: PHP - Theory and Design
Topic: Graphs. Bar charts and Pie Charts
Replies: 3
Views: 790

Graphs. Bar charts and Pie Charts

Not sure if this is the correct place. But on my site, I need to make bar charts, pie charts and line graphs for maintenance history of certain "products". Let's call them widgets. hah. Anybody know where I can find something to either A. do this for me or B. (prefered) show me how to do it?
by Skoalbasher
Tue Feb 10, 2009 2:03 pm
Forum: PHP - Code
Topic: Generate static HTML from PHP/MySQL
Replies: 8
Views: 636

Re: Generate static HTML from PHP/MySQL

Why do you want to make all these pages? This could be done all with 1 page using php. Not sure your application, but seems like a waste of space to me. There are many reasons to do this. For instance, an application that is write once - read many, it is pointless to make a database hit for each re...
by Skoalbasher
Tue Feb 10, 2009 1:07 pm
Forum: PHP - Code
Topic: Local Network Adapter info
Replies: 3
Views: 186

Re: Local Network Adapter info

You mean the clients network adapter info? Because "local" in php is generally the server itself.
by Skoalbasher
Tue Feb 10, 2009 1:06 pm
Forum: PHP - Code
Topic: Jump menu firing blanks
Replies: 11
Views: 751

Re: Jump menu firing blanks

I dunno if it matters, but when I pull something from $row, I use single quote instead of double.

$row['likethis'];

not
$row["notlikethis"];

Again, dunno if it matters because i've never tried it the second way.
by Skoalbasher
Tue Feb 10, 2009 1:01 pm
Forum: PHP - Code
Topic: Generate static HTML from PHP/MySQL
Replies: 8
Views: 636

Re: Generate static HTML from PHP/MySQL

Why do you want to make all these pages? This could be done all with 1 page using php. Not sure your application, but seems like a waste of space to me.
by Skoalbasher
Tue Feb 10, 2009 8:40 am
Forum: PHP - Code
Topic: Having problems with a signup form
Replies: 1
Views: 317

Re: Having problems with a signup form

What's supposed to happen here, and what doesn't work about it? Does it give you an error? Does it email to the wrong spot and it gets spit back? Also try and put your code in the code tags.   $preg = getLoginRegex(); if (!preg_match($preg, $vars['login'])){ $error[] = $config['login_disallow_spaces...
by Skoalbasher
Tue Feb 10, 2009 8:32 am
Forum: PHP - Code
Topic: Random Query??
Replies: 15
Views: 1888

Re: Random Query??

[sql]SET @num := 0, @genre := ''; SELECT       genre,       title,      @num := IF(@genre = genre, @num + 1, 1) AS row_number,      @genre := genre AS __genreFROM      (            SELECT                  genre,                   title                              FROM                  tb_book     ...
by Skoalbasher
Mon Feb 09, 2009 5:54 pm
Forum: PHP - Code
Topic: Random Query??
Replies: 15
Views: 1888

Re: Random Query??

I agree that genre should be a different table but for this example it's not :( I also thing we should be able to pull this off in one query. Yeah, like jay said, that's the only way I know how to do it. You know, creating a new table wouldn't be hard. Then convert all the genres in your books tabl...
by Skoalbasher
Mon Feb 09, 2009 4:30 pm
Forum: PHP - Code
Topic: Random Query??
Replies: 15
Views: 1888

Re: Random Query??

If he wants 3 books, he should just change the LIMIT from 1 to 3. By the way, I knew it could be done like that, but it's surely not the best way to do it. I think someone here will be able to put that into one query. Well, it has to either be 3 different queries or one long one. That's how I would...
by Skoalbasher
Mon Feb 09, 2009 1:04 pm
Forum: PHP - Code
Topic: Sorting Database Entries
Replies: 7
Views: 430

Re: Sorting Database Entries

Crispin_Java wrote:Thanks SkoalBasher,
Then how do I put each field into a seperate string?

Cheers,
Crispin
You already know how. :) You did it in the example you provided us.
by Skoalbasher
Mon Feb 09, 2009 1:02 pm
Forum: PHP - Code
Topic: members area only ???
Replies: 3
Views: 138

Re: members area only ???

Look up $_SESSION or cookies.