Echo an iframe with a html src that has a php variable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Main Man
    New Member
    • Mar 2014
    • 2

    Echo an iframe with a html src that has a php variable

    I have a problem on this code

    <iframe src="<?php echo $gateway_url; ?>" frameborder="0" scrolling="no"> </iframe>

    I want to call up the $gateway_url but I am having this error

    Parse error: syntax error, unexpected '<'

    Can someone help me
  • Main Man
    New Member
    • Mar 2014
    • 2

    #2
    I hope this will show you where i want to achieve

    $gateway_url = $url."?ORDERID= ".$orderid."&SE SSIONID=".$sess ionid;

    <iframe src="<?php echo $gateway_url; ?>" frameborder="0" scrolling="no"> </iframe>

    Comment

    • koharu
      New Member
      • Apr 2014
      • 10

      #3
      Maybe try;

      Code:
      <?php
      $gateway_url = $url."?ORDERID=".$orderid."&SESSIONID=".$sessionid;
      
      echo '<iframe src="{$gateway_url}" frameborder="0" scrolling="no"></iframe>';
      ?>
      Without seeing the rest of your code, debugging is not really possible.

      Comment

      Working...