User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 375,199 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,054 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 352 | Replies: 7
Reply
Join Date: Apr 2008
Posts: 7
Reputation: didi00 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
didi00 didi00 is offline Offline
Newbie Poster

How do I pass a link (webpage) through url?

  #1  
Apr 30th, 2008
Hello,

I'm new in coding in php
I want to transfer a webpage (news5.html) to another webpage (in a table).
(Like it is done on the news websites "www.domain.com/index?ID=4343"
How can I do it?

I read about passing variables through url, but if it is how it should be done how do I include a link in the variable?

Please help me
Last edited by didi00 : Apr 30th, 2008 at 5:12 pm.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2008
Location: Ottawa, Ontario
Posts: 15
Reputation: mom_of_3 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 3
mom_of_3's Avatar
mom_of_3 mom_of_3 is offline Offline
Newbie Poster

Re: How do I pass a link (webpage) through url?

  #2  
Apr 30th, 2008
I am not sure exactly what it is your trying to do.. If you are looking to get the info from the link you would use $_GET['ID'] to retrieve the 4343 from the url.. if you are looking to display the content of news5.html page within the table you have created on another page then you might use include('news5.html').
Reply With Quote  
Join Date: Nov 2006
Location: South Wales
Posts: 159
Reputation: phper is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 10
phper's Avatar
phper phper is offline Offline
Junior Poster

Re: How do I pass a link (webpage) through url?

  #3  
Apr 30th, 2008
Do you mean like screenscraping?
If you find my post useful please add to my reputation!! Thanks!

ajtrichards web solutions
http://www.ajtrichards.co.uk
Reply With Quote  
Join Date: Apr 2008
Posts: 7
Reputation: didi00 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
didi00 didi00 is offline Offline
Newbie Poster

Re: How do I pass a link (webpage) through url?

  #4  
Apr 30th, 2008
Yes I want to display the content of news5.html page within the table I have created on another page...

I tried this so far...but it doesnt work

  1. <?php
  2. echo "<a href='1.php?ID=2442'>";
  3. echo "click";
  4. ?>


and in the other file:

  1. <?php
  2. if $_GET['ID'] == 2442 echo file_get_contents("news5.html");
  3. ?>


any suggestion?
Last edited by peter_budo : May 1st, 2008 at 12:16 pm. Reason: Keep It Organized - please use [code] tags
Reply With Quote  
Join Date: Aug 2007
Location: Cavite,Philippines
Posts: 473
Reputation: ryan_vietnow is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 62
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro in Training

Re: How do I pass a link (webpage) through url?

  #5  
Apr 30th, 2008
Why not use frames?
"death is the cure of all diseases..."
http://ryantetek.wordpress.com
Reply With Quote  
Join Date: Apr 2008
Posts: 7
Reputation: didi00 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
didi00 didi00 is offline Offline
Newbie Poster

Re: How do I pass a link (webpage) through url?

  #6  
Apr 30th, 2008
It's far from esthetic

isnt it possible with php ?
Reply With Quote  
Join Date: Feb 2008
Location: Ottawa, Ontario
Posts: 15
Reputation: mom_of_3 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 3
mom_of_3's Avatar
mom_of_3 mom_of_3 is offline Offline
Newbie Poster

Re: How do I pass a link (webpage) through url?

  #7  
May 1st, 2008
maybe..

<a href="mypage.php?id=2442" target="_self">Click</a>

on the page

  1. $page = $_GET['id'];
  2.  
  3. if($page = 2442) {
  4. include('news5.html');
  5. }
Last edited by peter_budo : May 1st, 2008 at 12:17 pm. Reason: Keep It Organized - please use [code] tags
Reply With Quote  
Join Date: May 2008
Location: indonesia
Posts: 5
Reputation: fanaticweb is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
fanaticweb fanaticweb is offline Offline
Newbie Poster

Re: How do I pass a link (webpage) through url?

  #8  
May 1st, 2008
newbee approach:

<iframe src="http://www.domain.com" frameborder="0" scrolling="auto"></iframe>
Last edited by peter_budo : May 3rd, 2008 at 6:51 pm. Reason: Keep It Organized - please use [code] tags
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 2:33 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC