Variables showing?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shellyb
    New Member
    • Jan 2012
    • 1

    Variables showing?

    I have a program that is passing me variables.

    {$firstname}
    {$refid}

    I need to know the syntax of html to say

    HELLO JOHN (where firstname=john)

    and the syntax for a "<a href "http://www.mysite.com/"+{$refid}
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    HTML is not a programming language, but a markup language. hence there are no variables. you have to do it in the programming language that creates the HTML.

    Comment

    • Exequiel
      Contributor
      • Jul 2012
      • 288

      #3
      You can save it in php file type. but you need php tag for your program... example :
      Code:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>Sample By Zick</title>
      </head>
      <body>
      <?php	
      			$refid="porn";
      			$firstname="JOHN";
      			
      			echo 'Hello '.$firstname.'<br>';		
       ?>
      	<a href="http://www.mofos.com/<?php echo $refid; ?>">Click Me baby</a>
      </body>
      </html>
      just save it like this, filename.php

      but you need xampp to run php files.

      Comment

      Working...