Jump to content

Recommended Posts

 

 

hi..i m new to p hp

 

could anyone let me know

 

 

How to include Link that could open in same page rather than going to another page

 

 

for example, if i include a file in home.php

 

<? include("/index.php") ?> and I want to open up the LINKS in  "index.php"

 

in same home.php.

 

example  - open    "/index.php?p=Hits"  on same home.php page

 

I know i could have FRAMES but i dont want to frames in my site

 

 

thank y ou

 

Link to comment
https://forums.phpfreaks.com/topic/61041-open-link-in-included-page/
Share on other sites

Huh!!

 

is their a php question in that post?

 

include

Example 16.5. Basic include() example

vars.php

<?php

 

$color = 'green';

$fruit = 'apple';

 

?>

 

test.php

<?php

 

echo "A $color $fruit"; // A

 

include 'vars.php';

 

echo "A $color $fruit"; // A green apple

 

?>

Each link would have to be assigned a variable and when that link is accessed it would have to cass that function in a $_GET variable. Just rambling on not sure if I am right or not but that is how I belive it would be done then send a link via

<a href=index.php?link=greenapple>Apple Farms Visit Us! Donate Money</a>

 

ps: I love that thing in guros name: "I Try To f1" Love it!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.