Author |
Message |
13/12/2004 05:29:18
|
ordinary1
Beginner
Joined: 13/12/2004 03:23:40
Messages: 10
Offline
|
This is a problem concerning PHP:
I have a table with two cells beside each other. I want to include PHP files in each cell so that I can make changes to each file, rather than the main file that contains the table. The file included in the left cell will contain links. I want the file included in the right cell to contain polls, but I do not have it that way now...I would be happy with whatever as long as I don't have to make changes to the main file.
The idea is: A user should be able to click any link in a list in the left cell, and the appropriate poll will display in the right cell. I want links on the left for the poll, its results, and its comment. I also want a poll's results link and comment link with it in the right cell. I've been able to make the links (in the left cell) actually display the correct poll, but when I click the link (in either cell) to show the results for the same poll, it shows the results for the wrong poll...this is always the same poll's results no matter which results link I click.
Following is the code in the main PHP file:
index.php
in the left cell:
in the right cell:
Following is the code in the file to go in the left cell:
mainleftwindow.php
Any help would be appreciated.
Thanks!
ordinary1
|
|
15/12/2004 20:58:16
|
ordinary1
Beginner
Joined: 13/12/2004 03:23:40
Messages: 10
Offline
|
Apparently, my question is one of two things:
1) Too difficult for everyone that has viewed it.
2) Not interesting enough for anyone to care to help.
I don't know which one I would rather it be, but I hope someone will be smart enough and interested enough to offer some help.
Whoever you are, thanks in advance!
ordinary1
|
|
15/12/2004 21:12:31
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
You missed off the third option. YOU ARE TO IMPATIENT TO WAIT MORE THAN 3 1/2 HOURS.
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
15/12/2004 21:33:14
|
ordinary1
Beginner
Joined: 13/12/2004 03:23:40
Messages: 10
Offline
|
Carbonize wrote:You missed off the third option. YOU ARE TO IMPATIENT TO WAIT MORE THAN 3 1/2 HOURS.
"I AM TOO IMPATIENT..."
I don't understand exactly what you're saying, but if you're suggesting that I'm too impatient because I've only waited 3 1/2 hours for a reply...look at the date of my original post again. I've been waiting since Sunday.
ordinary1
|
|
15/12/2004 22:20:24
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
My mistake. Still being impatient. You need to either wait for Auron to see the post or contact him.
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
16/12/2004 01:35:48
|
Auron
Expert
Joined: 23/06/2003 22:02:17
Messages: 1053
Offline
|
Too tired right now.
<place holder>
|
Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought) |
|
16/12/2004 17:04:46
|
ordinary1
Beginner
Joined: 13/12/2004 03:23:40
Messages: 10
Offline
|
I know the feeling. However, if you do have any advice later, I would greatly appreciate it.
ordinary1
|
|
16/12/2004 21:23:06
|
Auron
Expert
Joined: 23/06/2003 22:02:17
Messages: 1053
Offline
|
That looks alright.
Do you get any errors?
In mainleftwindow.php try the 5 without ' and '. I think integers don't require quotes. Otherwise they may (i think) get interpreted as char's.
Auron
|
Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought) |
|
16/12/2004 22:49:14
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
Shouldn't make a difference. Variables in PHP are very variable unless defined. eg
$blah = 'mary'; makes a string variable with the value mary
$blah = 1; makes a integer with the value 1.
but
$blah = 'mary264'; //makes a string with the value mary264.
$foo = $blah + 3; // makes $foo a integer with the value 267 (264 + 3)
PHP's funky like that.
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
17/12/2004 06:07:48
|
ordinary1
Beginner
Joined: 13/12/2004 03:23:40
Messages: 10
Offline
|
Auron wrote:Do you get any errors?
In mainleftwindow.php try the 5 without ' and '. I think integers don't require quotes. Otherwise they may (i think) get interpreted as char's.
Auron
No, I do not get any errors. The integer vs. char issue makes sense, but taking out the quotes made no difference.
Carbonize wrote:Shouldn't make a difference. Variables in PHP are very variable unless defined.
What you're saying appears to be correct.
ordinary1
|
|
20/12/2004 18:22:42
|
ordinary1
Beginner
Joined: 13/12/2004 03:23:40
Messages: 10
Offline
|
I still need some help, please.
|
|
20/12/2004 20:27:21
|
Auron
Expert
Joined: 23/06/2003 22:02:17
Messages: 1053
Offline
|
Could try sessions.
Using $_SESSION (i think) try www.php.net
|
Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought) |
|
20/12/2004 20:55:57
|
ordinary1
Beginner
Joined: 13/12/2004 03:23:40
Messages: 10
Offline
|
I'll look into this. Thanks, Auron!
ordinary1
|
|
20/12/2004 21:17:13
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
If only sessions were that simple lol
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
20/12/2004 21:43:18
|
ordinary1
Beginner
Joined: 13/12/2004 03:23:40
Messages: 10
Offline
|
Carbonize wrote:If only sessions were that simple lol
Do you think that this is not the solution?
Or do you just think that implementing sessions is easier said than done?
|
|
|