Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Old 01-14-2004, 06:00 PM PHP Question
Skilled Talker

Posts: 87
Location: New York
Trades: 0
how would i set up my webpage so that the content in a specific table, read from a different file depends on what you click on?
NYChaoS is offline
Reply With Quote
View Public Profile Visit NYChaoS's homepage!
 
 
Register now for full access!
Old 01-14-2004, 06:05 PM
WaHoOoO!'s Avatar
Mentally Unstable Tugboat Captain

Posts: 797
Name: Chad
Location: /usr/bin/perl
Trades: 0
You can't, as far as I know. Each document calls from 1 CSS document. However, if you want to create different table setups, why not just create additional tags with unique ID's? For example:

Code:
.table1 {align: left; background-color: #FF0000; border: 0}
.table2 {align: right; background-color: #E8B900; border: 3}
And then in your document, do the following:

Code:
<table class="table1">...</table>
<table class="table2">...</table>
[edit: glaring CSS error, fixed now]
__________________
He's baaaaaaaack....
WaHoOoO! is offline
Reply With Quote
View Public Profile Visit WaHoOoO!'s homepage!
 
Old 01-14-2004, 06:13 PM
Skilled Talker

Posts: 87
Location: New York
Trades: 0
nono... sorry if i explained it wrong

lets say i have a main.php and i click on a link and it goes to main.php?action=blah.php or something like that and the data in a part in main.php changes.
NYChaoS is offline
Reply With Quote
View Public Profile Visit NYChaoS's homepage!
 
Old 01-15-2004, 03:30 AM
Ultra Talker

Posts: 377
Trades: 0
I prefer this way:
1) make your link like that:
<a href=main.php?content=yourpage>Your link</a>
2) in main.php place tyhe following code
<?include ($content.php);?>

On different links your souhld place a different "content"...
__________________
andrews_john

Please login or register to view this content. Registration is FREE
andrews_john is offline
Reply With Quote
View Public Profile Visit andrews_john's homepage!
 
Old 01-15-2004, 04:03 PM
Skilled Talker

Posts: 87
Location: New York
Trades: 0
thanks alot, but what do i put in the content.php page
NYChaoS is offline
Reply With Quote
View Public Profile Visit NYChaoS's homepage!
 
Old 01-16-2004, 02:52 AM
Ultra Talker

Posts: 377
Trades: 0
There should be no "content.php" file. Explaining: you want part of data on your page to change, right? "$content" is a varaible which will contain name of your page. For example, "data1.php" will contain one variant of your data. "data2.php" will contain another part. So you'll got to links:

<a href=main.php?content=data1>Main page with data1</a>

<a href=main.php?content=data2>Main page with data2</a>

in "main.php":
<?include($content.php);?>

If you click 1st link you will go to main page, containing data1. If you click 2nd link you'll go to main page, but it will contain data2...
__________________
andrews_john

Please login or register to view this content. Registration is FREE
andrews_john is offline
Reply With Quote
View Public Profile Visit andrews_john's homepage!
 
Old 01-16-2004, 04:01 PM
Skilled Talker

Posts: 87
Location: New York
Trades: 0
ok thanks alot that makes more sence =]
NYChaoS is offline
Reply With Quote
View Public Profile Visit NYChaoS's homepage!
 
Old 01-24-2004, 05:25 PM
Novice Talker

Posts: 13
Location: Oregon
Trades: 0
If he doesn't have global variables setup he'll need to specify $content by saying:

$content = $_GET['content'];
__________________
Tutorialized.com
Free Tutorials for Everything!
tutorialized is offline
Reply With Quote
View Public Profile Visit tutorialized's homepage!
 
Reply     « Reply to PHP Question
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 3.89243 seconds with 12 queries