Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9045589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:23:04+00:00 2026-06-16T11:23:04+00:00

Hi I will try explain this as best I can. I am using a

  • 0

Hi I will try explain this as best I can. I am using a php master page structure linking content through the include function as in

<?php 
   $page=$_GET['page'];
   include($page);
 ?>

I am using a database to display a blog and have added a ID to each post to allow the user to navigate to the actual blog post, instead of viewing it in a list. The issue I am having is that the link works but when I add the master page structure into the link it can’t find the ID. For example,

Works

<a href="blog2.php?id=<?php echo $post['post_id']; ?>">

but

Does not work

<a href="../anonymous/anonymous.master.php?page=blog2.php?id=<?php echo $post['post_id']; ?>">

Obviously the first link displays only the blog2.php data and not the master page data.I am guessing it is the way I have structured the link and any help would be appreciated. If any more questions or I havn’t explain myself please ask.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T11:23:05+00:00Added an answer on June 16, 2026 at 11:23 am

    A couple of things. First, to fix your problem you need an & rather than ? between the page and id parameters in the second case. So it should look like this:

    <a href="../anonymous/anonymous.master.php?page=blog2.php&id=<?php echo $post['post_id']; ?>">
    

    Second, you REALLY need to sanitize your input.

    In this case:

    <?php 
       $page=$_GET['page'];
       include($page);
     ?>
    

    If your server isn’t properly configured, I could easily pass a URL for page and have your server execute arbitrary code from another website, compromising your entire system.

    In the case of the URL’s, you are echoing post variables directly to the page, leaving yourself open for cross-site-scripting (XSS) attacks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm going to try to explain this best I can I will provide more
I will try to explain this as best as I can and hope someone
I will try and explain this the best way I can. I have a
I will try to explain this the best that I can. I have a
I will try to explain this the best I can. I created a CMS
I will try to explain this the best way I can, but feel free
I will to try to explain this as best as I can. I have
This will be a bit difficult to explain but I will try my best.
I'm going to try and explain this the best I can. I used this
I'll try to explain this as best as I can. I have a form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.