Jump to content

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


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">

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.