Jump to content

PHP passing variables


dannybrazil

Recommended Posts

hello

i want to pass variables from page to page and i can get it to show

 

first link :

<?php

$city_name=$_GET['city'];

echo '<a href="http://www.brasilwebdesign.com/classifieds/addform.php?city=$city_name">'."add form".'</a>';

?>

 

when im coding " echo $city_name;

im getting the city name from the last page (www.....php?city=abcd) OK

 

but it doesnt padd the city name in this link .

 

in the next page it writes me as the city name " $city_name" instead of "abcd"

 

any help ?

Link to comment
https://forums.phpfreaks.com/topic/98674-php-passing-variables/
Share on other sites

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.