Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old February 28th, 2004, 03:11 PM
sayee3k1 sayee3k1 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 27 sayee3k1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
php pages

Hai

I an new to PHP and need some help.

what i am trying to do is

A php page such that it shuld have the some links on the top

world | windows | linux | DOS|

and every time we click on any of these links the corresponding pages should be displayed......

tat is the a page snippet corresponding the windows url shuld be displayed if i click dos ..........


I am calling my tech.php(which contains the above link) into the index.php

and my tech.php has the following code



tech.php
------------------


<!-- Begin Left Menu -->
<?php require("http://host/menus/top.php"); ?>
<!-- End Left Menu -->




<!-- Begin PhP content -->
<div id="tech">
<?php
switch($HTTP_GET_VARS['page'])

{ /* Script courtesy of EvilWalrus.com */
case '0':
include ' http://host/content/home.php ';
break;
case '1':/* Alias for the actual page for security purposes */
include ' http://host/content/win.php ';
break;
case '2':
include ' http://host/content/linux.php ';
break;
case '3':
include ' http://host/content/dos.php ';
break;

default:
include ' http://host/content/home.php ';
break;
}
?>


the top.php

---------------

<table width=850 cellpadding="3">
<tr align=center>
<td align="center" width=132><a href="counter/exit.cgi?http://host/content/tech.php?page=0" class="postlink">Tech Home</a></td>

<td align="center" width=5> | </td>

<td align="center" width=132><a href="counter/exit.cgi?http://host/content/tech.php?page=1" class="postlink">Windows</a></td>

<td align="center" width=5> | </td>

<td align="center" width=132><a href="counter/exit.cgi?http://host/content/tech.php?page=2" class="postlink" >Linux</a></td>

<td align="center" width=5> | </td>

<td align="center" width=132><a href="counter/exit.cgi?http://host/content/tech.php?page=3" class="postlink"> DOS</a></td>

<td align="center" width=5> | </td>

<td align="center" width=302><a href="counter/exit.cgi?http://host/content/tech.php?page=4" class="postlink" > Free Downloadable Programs</a></td>
</tr>


</table>



now the problem is

it is not displaying home.php contents even when i have given the full path .

and when i click on the links then it take me to the new page with only the top.php and the page which is clicked .

I want that it shuld remain in the index.php and only the tech.php shuld change according to the contents .........

if this can be done in HTML how???

any suggestions will be reallly great!!!!!!

thanks

urs
davoood

Reply With Quote
  #2  
Old February 28th, 2004, 03:27 PM
GG Dart GG Dart is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 438 GG Dart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: php pages

hi, have you got that page online somewhere that I can have a look at it , bacause it would make it easyer to understand how your page is built.

Reply With Quote
  #3  
Old February 28th, 2004, 03:47 PM
GG Dart GG Dart is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 438 GG Dart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: php pages

ah I just read an older post of your's where you where trying to do more or less the same, now I think I understand a wee bit better how your site looks, but please still post the url if possible

Reply With Quote
  #4  
Old February 29th, 2004, 08:30 AM
valgevali valgevali is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Estonia
Posts: 10 valgevali User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: php pages

try to clarify a bit, what you want to do.. but in this case I suppose the most simple solution for You is to use html <frameset> and <frame> tags.

Reply With Quote
  #5  
Old February 29th, 2004, 10:24 AM
GG Dart GG Dart is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 438 GG Dart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: php pages

hm I don't get that, the url was posted and now it's away again. Why that? Couldn't even have a look at the page.

Reply With Quote
  #6  
Old February 29th, 2004, 03:52 PM
sayee3k1 sayee3k1 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 27 sayee3k1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
link

Hai the link to my page is I am talking about goes is here

http://sai.zer0host.com/tech.php?page=tstuff

I will really appreciate any kind of suggestions

Thanks a lot

urs
sai


Reply With Quote
  #7  
Old February 29th, 2004, 04:59 PM
GG Dart GG Dart is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 438 GG Dart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: php pages

ok, at the moment when I click one of the top things, it seems to open the same window new again.
Is
Quote:
Welcome to my technical site. I have written and compiled a lot of information here. Here are few tips which will make your interaction with the computer more interesting.

You can also take a look at the source code of few simple programs, I have coded. Feel free to download them.

the home.php?
and does allways everything on the page reload when clicking a link on the top?

Reply With Quote
  #8  
Old February 29th, 2004, 08:42 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
yes sir

thats what i am trying to correct.

I want that when i click on the corresponding links i shuld get the pages right but it always shows the same page.

can u help me out


Reply With Quote
  #9  
Old February 29th, 2004, 08:48 PM
sayee3k1 sayee3k1 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 27 sayee3k1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
edit

can any one suggest any code for that the way to do that so that when u click on the corresponding link the corrsponding page is displayed

thanks

urs
sai

Reply With Quote
  #10  
Old February 29th, 2004, 09:04 PM
GG Dart GG Dart is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 438 GG Dart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: php pages

Try this as tech.php
php Code:
Original - php Code
  1.  
  2. <!-- Begin Left Menu -->
  3. <?php require("http://host/menus/top.php"); ?>
  4. <!-- End Left Menu -->
  5.  
  6.  
  7.  
  8.  
  9. <!-- Begin PhP content -->
  10. <div id="tech">
  11. <?php
  12. $number = ($HTTP_GET_VARS['page'])
  13.  
  14. { /* Script courtesy of EvilWalrus.com */
  15. if ($number == 1){
  16. include ' http://host/content/home.php ';
  17. }
  18. if ($number ( == 2){
  19. include ' http://host/content/win.php ';
  20. }
  21. if ($number ( == 3){
  22. include ' http://host/content/linux.php ';
  23. }
  24. if ($number ( == 4){
  25. include ' http://host/content/dos.php ';
  26.  }
  27.  
  28. else {
  29. include ' http://host/content/home.php '
  30. }
  31. ?>

Reply With Quote
  #11  
Old March 1st, 2004, 12:35 AM
CodeKadiya CodeKadiya is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Colombo,Sri Lanka
Posts: 2,313 CodeKadiya User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
Send a message via Yahoo to CodeKadiya
RE: php pages

Well, I can understand.. do you mean something like I did in my website.. Layout stays the same in everypage, but

content changes.
http://kopikade.lk
Check it out!!!

Reply With Quote
  #12  
Old March 1st, 2004, 11:10 PM
sayee3k1 sayee3k1 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 27 sayee3k1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks

Thanks everyone I figured it out how to do it!!!!!!!

thanks to subhash and Mr.dart


urs
sai

Reply With Quote
  #13  
Old March 2nd, 2004, 10:35 AM
GG Dart GG Dart is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 438 GG Dart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: php pages

No prob, that's our job to help

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > php pages


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |