Jump to content

Putting a variable in a link


swampone

Recommended Posts

That didnt work. I should have probably made myself more clear, sorry. After trying your solution, the url is now showing with no variable.

localhost/index.php?page=

I have the variable

$page=3

on index.php and also on index.php I have

<a href="index.php?page=<?php echo $_GET['page3']; ?>"> 3 </a>

I thought maybe

<a href="index.php?page=<?php echo $page3; ?>"> 3 </a>

would work, but the url is now

<a href="index.php?page=<a%20href%20=

Archived

This topic is now archived and is closed to further replies.

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