Search Results

Search found 2 results on 1 pages for 'swiftsly'.

Page 1/1 | 1 

  • Variable not implementing correctly from if statement

    - by swiftsly
    I have an if statement that is supposed to set the variable $pc162v to a link specified in the MySQL table if content exists in the $vid column of the row. The problem is, the PHP is detecting that there's a link in the MySQL, but isn't setting the $pc162v variable correctly. Here's the variable declarations: $pc162v = ""; $vid162 = '<embed width="420" height="236" src="'.$pc162v.'" type="application/x-shockwave-flash"></embed>'; Here's the section of the if statement: if (empty($row[7])) { $vid162 = ''; } else { $pc162v = $row[7]; } In my web browsers, the part of the code where the variable $vid162 is used, shows up as the following: <embed width="420" height="236" src="" type="application/x-shockwave-flash"> I have also tried setting $vid162 to: <embed width="420" height="236" src="<?php echo $pc162v; ?>" type="application/x-shockwave-flash"></embed> and that just makes the code in my web browser: <embed width="420" height="236" src="<?php echo $pc162v; ?>" type="application/x-shockwave-flash"> Hope someone has a solution! Thanks in advance.

    Read the article

  • PHP: Set variable in to include file in 'if' statement

    - by swiftsly
    I am trying to set a variable in an 'if' statement so that only when the 'if' statement is true, the variable will be set and will be able to be used somewhere else on the page. Here's what I have tried: if ($row[8] == 1) { echo 'Message here'; ob_start(); include('F164.php'); $f164 = ob_get_clean(); } as well as: if ($row[8] == 1) { echo 'Message here'; $f164 = include('F164.php'); }

    Read the article

1