Solutions forum

Subscribe to posts

Forum » Website Development » Variables not shown

Ok so a few days ago my website was fine.

Now none of my variables are being displayed from the database. The CMS I'm using pulls in the title, keywords and description from the database, as well as all the page content.

Now no content is being displayed and I'm not sure at what point the error occurs.
I've had the same problem before, and it happened to me when I upgraded from PHP4 to PHP5.

Check how you're echoing your PHP values as I was using:

<meta name="keywords" content="<?=$keywords;?>" />

But since PHP5 it doesn't like the <?= so my code now looks like:

<meta name="keywords" content="<?php echo $keywords; ?>" />

And this now works fine. Try it out and let me know if still no such luck.

Latest activity

Latest member: stheshot

Latest category: Software compatibility

Latest topic: slow internet in Slow Computer

Latest post by Peter Nichol on Variables not shown in Website Development

Networks

Share this on Facebook  Google  Yahoo  Technorati  Reddit  Digg  del.icio.us