Field from url

7 posts by 3 authors in: Forums > CMS Builder
Last Post: June 26, 2020   (RSS)

By mbareara - June 25, 2020

Hi and thank you in advance for your help

I have a url like this http://www.blabla/list.php?city=taormina 

I would have something like "There are 13 results in TAORMINA" recalling the field city (Taormina in this case) from url. Is it possible?

Orazio

By gkornbluth - June 25, 2020

Hi Orazio,

How are you generating the URL with the city name?

Thanks,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By mbareara - June 25, 2020

i'm generating it with this code <a href="https://www.****.com/locali/list.php?city=<?php echo htmlencode($record['city']) ?>">

By Damon - June 25, 2020

HI Orazio,

To get this result:

"There are 13 results in TAORMINA

Try using this code:

<?php if (@$_REQUEST['city']) : ?>
There are <?php echo $newsMetaData['totalRecords']; ?> results in <?php echo $_REQUEST['city']; ?><br />
<?php endif; ?>

Replace $newsMetaData with the name of your section editor (table).

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By gkornbluth - June 25, 2020

Ah, it's wonderful when a real programmer comes up with simple, elegant solutions...

Thanks Damon.

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By mbareara - June 26, 2020

Thanks Damon and Jerry!