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.

PHP Forum


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



Freelance Jobs

Reply
Converting site into PHP
Old 07-03-2006, 12:15 AM Converting site into PHP
Experienced Talker

Posts: 30
Location: Richmond, VA
Trades: 0
I forgot the PHP code that one incorporates into the content area of their site so that when a link is clicked, the information in the link appears in the content area where the PHP code has been inserted..

I used to know this but I forgot (Guess I've been out of webmastering for too long)

Could someone post the PHP code in here, as well as the special code for the link? I know it's something along the lines of ?id= or something like that..

(E-MAIL: bmrtin@gmail.com if the site doesn't allow PHP code)
flashback is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-03-2006, 01:07 PM Re: Converting site into PHP
Ultra Talker

Posts: 256
Location: Auckland, New Zealand
Trades: 0
Way simply saying:

If the link is something like http://yourdomain.com/index.php?id=1

Then a simplified way (meaning poor security) would be:

PHP Code:
<?php
if(isset($_GET['id']) && $_GET['id'] == || !empty($_GET['id']))
{
  
$id $_GET['id'];
  switch(
$id)
  {
    case 
1:
      echo 
'<p>Do Something Here</p>';
      break;
    default:
      echo 
'<p>What Should I Do?</p>';
      break;
  }
}
?>
Where the switch statement handles what to do, however you can handle this how you like using your own means.

What it sounds like you're wanting is, the if statement and if it matches a certain value you would like to include('content_here.php'); which you should be able to make from what I've just given you.

Cheers,

MC
__________________
#------------------------------signature---------------------------------------------------------------------------------#
Quote:
I am well recognised for what I don't do than what I do. Chores are just one of those things.
mastercomputers is offline
Reply With Quote
View Public Profile Visit mastercomputers's homepage!
 
Old 07-03-2006, 08:42 PM Re: Converting site into PHP
Experienced Talker

Posts: 30
Location: Richmond, VA
Trades: 0
yeah I don't know if that's it or not

I just want so that when someone clicks a link, the link opens into the content box

i dont want to copy my whole HTML for my main page into all the content pages because its too much work
flashback is offline
Reply With Quote
View Public Profile
 
Old 07-03-2006, 08:53 PM Re: Converting site into PHP
Experienced Talker

Posts: 30
Location: Richmond, VA
Trades: 0
its like IFRAME but it isnt IFRAME

is that a better explanation, lol?
flashback is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Converting site into PHP
 

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 0.13430 seconds with 12 queries