help w/ php
Moderators: Big-O Ryan, Big-O Mark, Matt, jester22c
help w/ php
i got php4, and im trying to make use of it. this may sound like a stupid question cuz i am a n00b @ php, but can sum1 point me in the right dir?
im trying to send a person to a certain section on my site.
if they type sumthing like:
http://www.site.com/file.php?rav=13
i want it 2 load my top, bottom, and left frame like normal, but the right frame i want it 2 load a certain page depending on the number after the = sign.
(yes i have frames within frames, my middle frame is a file that has the left and right frame)
im trying to send a person to a certain section on my site.
if they type sumthing like:
http://www.site.com/file.php?rav=13
i want it 2 load my top, bottom, and left frame like normal, but the right frame i want it 2 load a certain page depending on the number after the = sign.
(yes i have frames within frames, my middle frame is a file that has the left and right frame)
- Big-O Mark
- Shortbus Driver
- Posts: 804
- Joined: Sun Jan 20, 2002 5:20 pm
- Location: Big-O Software
- Contact:
http://www.php.net/ is a great resource for all things php. It's not the best site for a beginner, but if you have a good handle on php it's a very powerful tool.
-Mark
Big-O Software
Big-O Software
- Plasma2002b
- Extreme Groupie
- Posts: 976
- Joined: Thu Jul 18, 2002 11:36 pm
- Location: Riverside, Ca
- Contact:
last year when i was learning stuff like that, the best place i found for a n00b to look around are on sites that offer free tutorials.......
the best thing to do would to go to www.google.com and type in something like 'php tutorial'
that will get ya prettty much all ya need to know on the php language. Sites that have the 'tutorials' usually offer much more as in terms of resources and code snippets, etc...... all ya ned to get started, and often stuff to go beyond that
the best thing to do would to go to www.google.com and type in something like 'php tutorial'
that will get ya prettty much all ya need to know on the php language. Sites that have the 'tutorials' usually offer much more as in terms of resources and code snippets, etc...... all ya ned to get started, and often stuff to go beyond that
- RansomedCaptive
- Newbie
- Posts: 16
- Joined: Thu Aug 08, 2002 9:02 am
- Contact:
just in case you havent found anything...
Code: Select all
<?
$ravNum = $_GET["rav"];
if ($ravNum == 13)
$frameToGet = "frame13.htm";
...
//use a switch if you want
?>
<html>
<frameset rows="80,*,80" frameborder="NO" border="0" framespacing="0">
<frame src="topFrame.htm" name="topFrame" scrolling="NO" noresize >
<frameset rows="*" cols="414,*" framespacing="0" frameborder="NO" border="0">
<frame src="leftFrame.htm" name="leftFrame" scrolling="NO" noresize>
<frame src="<? echo $frameToGet; ?>" name="rightFrame">
</frameset>
<frame src="bottomFrame.htm" name="bottomFrame" scrolling="NO" noresize>
</frameset>
<noframes>
<body>
frames not supported
</body>
</noframes>
</html>
wountnt this be better if he had a lot of frames so he would not have to make an if stament for every frame number
Code: Select all
<?
if ($rav != "") {
$frameToGet = "$rav";
} else {
$frameToGet = "0"; // if frame0.htm would be your base page
}
?>
<html>
<frameset rows="80,*,80" frameborder="NO" border="0" framespacing="0">
<frame src="topFrame.htm" name="topFrame" scrolling="NO" noresize >
<frameset rows="*" cols="414,*" framespacing="0" frameborder="NO" border="0">
<frame src="leftFrame.htm" name="leftFrame" scrolling="NO" noresize>
<frame src="frame<? echo $frameToGet; ?>.htm" name="rightFrame">
</frameset>
<frame src="bottomFrame.htm" name="bottomFrame" scrolling="NO" noresize>
</frameset>
<noframes>
<body>
frames not supported
</body>
</noframes>
</html>
- RansomedCaptive
- Newbie
- Posts: 16
- Joined: Thu Aug 08, 2002 9:02 am
- Contact:
it all depends on how many options he has... i interpretted it as different values would be acceptted, each associated with a unique page--allows infinite options; versus your interpretation of if there is a value of any sorts, display the different content--allows only 2 options.
but you do indirectly bring up a good point with your else statement--a default should be established given the situation no value is provided or for if the value submitted is not recognized.
----
edit: i did want to mention that i absolutely love php
but you do indirectly bring up a good point with your else statement--a default should be established given the situation no value is provided or for if the value submitted is not recognized.
----
edit: i did want to mention that i absolutely love php
thats basically what i tried but i tried it anyways
it didnt echo out anything
this is confusing to me, this should b able to work, it worked w/ 4.3.x, i dont think it was added after 4.0.0?
if it helps out
http://www.robpol86.com/php_nfo.php
it didnt echo out anything
this is confusing to me, this should b able to work, it worked w/ 4.3.x, i dont think it was added after 4.0.0?
if it helps out
http://www.robpol86.com/php_nfo.php
Who is online
Users browsing this forum: Semrush [Bot] and 1 guest