Hi,

I am having problems with the passing of a variable to the next page. I want to pass the $title so that I can use it in the changejob.php page.

The following is my code:-

<td> <a href="changejob.php?id = "<?php $title; ?>""><?php echo $title; ?></td>

Please help me. Thanks.

Recommended Answers

<td> <a href="changejob.php?id=<?php echo $title; ?>"><?php echo $title; ?></a></td>

/*
if
$title = "test";
then
<a href="changejob.php?id=test">test</a>
*/

And now, in changejob.php you can get the id value from the url:

$title = $_GET["id"];
// When you get the id value from the url …
Jump to Post

All 2 Replies

<td> <a href="changejob.php?id=<?php echo $title; ?>"><?php echo $title; ?></a></td>

/*
if
$title = "test";
then
<a href="changejob.php?id=test">test</a>
*/

And now, in changejob.php you can get the id value from the url:

$title = $_GET["id"];
// When you get the id value from the url then you will can to use in changejob.php

Wow, it works already. Thanks a lot.

<td> <a href="changejob.php?id=<?php echo $title; ?>"><?php echo $title; ?></a></td>

/*
if
$title = "test";
then
<a href="changejob.php?id=test">test</a>
*/

And now, in changejob.php you can get the id value from the url:

$title = $_GET["id"];
// When you get the id value from the url then you will can to use in changejob.php
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.