Cross posting this in the HTML forum as well, as I am not sure which is better.
I have a index page that is a frame set.
My frame set is
-1-|------2-------|
-3-|-4-|--5--|-6-|
I have a navigation pane in frame 3. The list is php/mysql driven. is what I would like is to display the content of the link in frame 5. I can do this fine making static pages and using name/target. Is what I am looking to do is make frame 5 a dynamic php/mysql driven page.
Ie they click on link xyz from panel 3 and it will display the xyz page in frame 5, but there is no static page for xyz.
Make sense? Help? Or am I out of luck?
7 1329
Cross posting this in the HTML forum as well, as I am not sure which is better.
I have a index page that is a frame set.
My frame set is
-1-|------2-------|
-3-|-4-|--5--|-6-|
I have a navigation pane in frame 3. The list is php/mysql driven. is what I would like is to display the content of the link in frame 5. I can do this fine making static pages and using name/target. Is what I am looking to do is make frame 5 a dynamic php/mysql driven page.
Ie they click on link xyz from panel 3 and it will display the xyz page in frame 5, but there is no static page for xyz.
Make sense? Help? Or am I out of luck?
Double posting is a no no.
I'm not sure what part of this you are having trouble with...it seems you have the concept, flow, and structure already thought out. Perhaps if you asked a question, you would get better responses.
sorry I should have checked the forum rules first ><
my question is how do I get that done?
in my <a href> do I add ,_$POST=$row[2] to the end of the file name? (Where post 2 is what I need passed?
I was just confused because I have never done post and get in frames, so I didn't know if it was possible. All my previous php passing has been via a form.
If your navigation frame is being populated by the database, then you just have it draw up the correct URLs in the HREF tag.
I might not be making this clear. Here is my navigation pane.
<?
$result = mysql_query("SELECT name, link, pkey FROM links ORDER BY lorder");
if($result)
{
while($row=mysql_fetch_row($result))
echo "<a href=$row[1] target='tbody'>$row[0]</a><br>";
}
?>
Is what I would like is a way to pass pkey (row[2]) to frame tbody so I can make one generic page that would look like this
<?
$result = mysql_query("SELECT text, header, FROM text WHERE llink=passed variable");
output results
?>
That way I don't have to make 10 pages for 10 links, I can make one page that will pull the information from the database (in frame 5).
I see what you are getting at now:
Yes, I would do something like this:
[PHP]
<?php
//Nav page
$result = mysql_query("SELECT name, pkey FROM links ORDER BY lorder");
if($result)
{
while($row=mysql_fetch_row($result))
echo "<a href='loadLink.php?pkey={$row['pkey']}' target='tbody'>{$row['name']}</a><br>";
}
?>
<?php
//loadLink.php
$keyPage = $_GET['pkey'];
// Load correct data based on what the $keyPage number is
[/PHP]
I might not be making this clear. Here is my navigation pane.
<?
$result = mysql_query("SELECT name, link, pkey FROM links ORDER BY lorder");
if($result)
{
while($row=mysql_fetch_row($result))
echo "<a href=$row[1] target='tbody'>$row[0]</a><br>";
}
?>
Is what I would like is a way to pass pkey (row[2]) to frame tbody so I can make one generic page that would look like this
<?
$result = mysql_query("SELECT text, header, FROM text WHERE llink=passed variable");
output results
?>
That way I don't have to make 10 pages for 10 links, I can make one page that will pull the information from the database (in frame 5).
I see what you are getting at now:
Yes, I would do something like this:
[PHP]
<?php
//Nav page
$result = mysql_query("SELECT name, pkey FROM links ORDER BY lorder");
if($result)
{
while($row=mysql_fetch_row($result))
echo "<a href='loadLink.php?pkey={$row['pkey']}' target='tbody'>{$row['name']}</a><br>";
}
?>
<?php
//loadLink.php
$keyPage = $_GET['pkey'];
// Load correct data based on what the $keyPage number is
[/PHP]
That works exactly right, thanks so much. I think my probelm is I wasn't adding { } after the =
Yes, you need to do this otherwise PHP will not correctly interpret arrays embeded in strings. The other way to do this is to exit the string, and concatenate:
[php]
$var = "The POST value for username was ".$_POST['username'].", but we didn't let him in!";
[/php]
A good thing to do would be to look up the difference between single and double quotes; double quotes are parsed for variables, meaning they take a very slight performance hit versus single quotes.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: VK |
last post by:
09/30/03 Phil Powell posted his "Radio buttons do not appear checked"
question.
This question led to a long discussion about the naming rules applying to
variables, objects, methods and properties...
|
by: Boris Ammerlaan |
last post by:
This notice is posted about every week. I'll endeavor to use the same
subject line so that those of you who have seen it can kill-file the
subject; additionally, Supersedes: headers are used to...
|
by: Hazzard |
last post by:
I just realized that the code I inherited is using all asp.net server
controls (ie. webform controls) and when I try to update textboxes on the
client side, I lose the new value of the textbox when...
|
by: henry |
last post by:
Folks
Here's a skeleton, generic HTML page, call it "index.php". You'll see a bit
of php code in the middle:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |