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...