Jump to content

Why dose this not work?. (code appears on page as plain text?)


ChrisMartino

Recommended Posts

                                <p>Test hello
			<a href="products.php?action=samp" target="_blank">
			<img src="http://www.sa-mp.com/images/logo.gif" border="0" alt="SA-MP Hosting" />
			</a>

			</p>


			if ($action == samp) { 
                                <h1>Game Servers</h1>
                                <p>Lorem ipsum dolor sit amet,
                                <a href="#" title="link">link</a>, <a class="visited" href="#" title="visited link">visited link</a>, 
                                 <a class="hover" href="#" title="hovered link">hovered link</a> consectetuer 
                                adipiscing elit. Quisque sed felis. Aliquam sit amet felis. Mauris semper, 
                                velit semper laoreet dictum, quam diam dictum urna, nec placerat elit nisl 
                                in quam. Etiam augue pede, molestie eget, rhoncus at, convallis ut, eros.</p>
			}

                                <p>

 

The PHP code just appears as text on the page?

try this:

 

			   <p>Test hello
            <a href="products.php?action=samp" target="_blank">
            <img src="http://www.sa-mp.com/images/logo.gif" border="0" alt="SA-MP Hosting" />
            </a>

            </p>
            
            <?php

		$action = $_GET['action'];
		$samp = "samp";

            if ($action == $samp) {
		?>
                                <h1>Game Servers</h1>
                                <p>Lorem ipsum dolor sit amet,
                                <a href="#" title="link">link</a>, <a class="visited" href="#" title="visited link">visited link</a>,
                                 <a class="hover" href="#" title="hovered link">hovered link</a> consectetuer
                                adipiscing elit. Quisque sed felis. Aliquam sit amet felis. Mauris semper,
                                velit semper laoreet dictum, quam diam dictum urna, nec placerat elit nisl
                                in quam. Etiam augue pede, molestie eget, rhoncus at, convallis ut, eros.</p>
           <?php
	   }
	   ?>

Yup that worked the treat, But is there any way i can stop it opening in a new browser and make it just open as if you were clicking a link in the nav bar?.

 

Remove the _blank target?

 

<a href="products.php?action=samp" target="_blank">

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.