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

  • Home
  • SEARCH
  • 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 9168613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:39:59+00:00 2026-06-17T15:39:59+00:00

I am passing a variable in a URL from create_topic.php, but the variable is

  • 0

I am passing a variable in a URL from create_topic.php, but the variable is empty. The page passing the variable uses that variable in a mysql query OK, so I know that its not empty then, but when I click a link in that page to go to another page, the variable is not being passed.

in create_topic.php I have:

$author_pk = $_GET['author_pk'];

Then in the query on that page:

$query = "INSERT INTO topic (topic_pk,title,topic,majors,sub_discipline_fk,author_fk,created,place)
  VALUES ('','$title','$topic','$majors_string','$sub_discipline','$author_pk',NOW(),'$place')";
$result = mysql_query($query, $connection) or die(mysql_error());

$author_pk contains the passed value OK.

But in a link in create_topic.php I have:

<a href="create_author.php?author_pk="<?php echo $author_pk; ?>>Create</a>

$author_pk is then empty in the URL…

  • 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-17T15:40:01+00:00Added an answer on June 17, 2026 at 3:40 pm

    Your double quote is out of place. A simple syntax highlighter (like that on StackOverflow) will reveal this to you.

    This:

    <a href="create_author.php?author_pk="<?php echo $author_pk; ?>>Create</a>
    

    Should be:

    <a href="create_author.php?author_pk=<?php echo $author_pk; ?>">Create</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have done urlencode of the variable before passing to the URL http://example.com/Restaurants?alias=F%26B But
I am writing a php/mysql app that uses a few different tables. Table 1
When passing variable from one page to another To avoid the user messing around
My Jquery date selector is passing my date variable in the format 22+Mar+2012 but
Possible Duplicate: Passing javascript variable to PHP Hi I wonder if it's possible to
I'm not really certain where the problem lies but I am passing a variable
I have a page with a check box so that when its checked, it
I need to pass a variable to my other page through the URL bar.
I need to make query like this: SELECT p.pid, p.url FROM products as p
Hey I have a problem in Javascript-PHP variable passing heres my php code: <li

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.