Status
Not open for further replies.

clarksta

Active Member
633
2008
1
0
hi
im not no great coder but have tried with this sevral times and it still does the same, take a look at the code below now there are some tags missing if i put them in then upload it to the server it goes live "clicable" this is not what i want as its part of my help page on my top list it needs to be readable "copy n paste" stuff
PHP:
function help($id) {
    global $list_name,$list_url,$voteimage_1,$voteimage_2,$voteimage_3;

echo "<hr><b><li>TextLink:</b><br>";
echo "< href=\"$list_url/in.php?site=$id\" target=\"_blank\">$list_name&lt/a&gt\n";


if ($voteimage_1) {
  echo "<p><hr><b><li>PictureLink:</b><br>\n";
  echo "< href=\"$list_url/in.php?site=$id\" target=\"_blank\"&gt<br>img src=\"http://www.yourdomain.com/vote_image2.gif\" alt=\"Enter $list_name and Vote for this site !!!\" border=0&gt&lt/a&gt\n";
  echo "<p><center><img src=\"$voteimage_1\"><br>This is the image. Please save it on your server.<br>(Right mouseclick - Save as ...)</center><br>\n";
  }

if ($voteimage_2) {
  echo "<p><hr><b><li>PictureLink 2:</b><br>\n";
  echo "< href=\"$list_url/in.php?site=$id\" target=\"_blank\"&gt<br>img src=\"http://www.yourdomain.com/vote_image2.gif\" alt=\"Enter $list_name and Vote for this site !!!\" border=0&gt&lt/a&gt\n";
  echo "<p><center><img src=\"$voteimage_2\"><br>This is the image. Please save it on your server.<br>(Right mouseclick - Save as ...)</center><br>\n";
  }

if ($voteimage_3) {
  echo "<p><hr><b><li>PictureLink 3:</b><br>\n";
  echo "< href=\"$list_url/in.php?site=$id\" target=\"_blank\"&gt<br>img src=\"http://www.yourdomain.com/vote_image2.gif\" alt=\"Enter $list_name and Vote for this site !!!\" border=0&gt&lt/a&gt\n";
  echo "<p><center><img src=\"$voteimage_3\"><br>This is the image. Please save it on your server.<br>(Right mouseclick - Save as ...)</center><br>\n";
  echo "<p>";
  }
}

the page link so you can see it
http://www.warezhaven.net/help.php

thanks if anyone can help out here
 
7 comments
PHP:
echo "< href=\"$lis   //ok there must be an a after the <
gt<br>img src=\"http:/ //before the img there must be <
however if i put them in then the help pages turns into active links that are no good
as they need to show like they are
</span></span>
 
Code:
<textarea cols="70" rows="2">the code you want to be copy+pasted</textarea>
From what I understood, that is what you want.
 
ok this is how it is atm
PHP:
#  Help Language Forms
#################################################################################################

function help($id) {
    global $list_name,$list_url,$voteimage_1,$voteimage_2,$voteimage_3;

echo "<hr><b><li>TextLink:</b><br>";
echo "< href=\"$list_url/in.php?site=$id\" target=\"_blank\">$list_name&lt/a&gt\n";


if ($voteimage_1) {
  echo "<p><hr><b><li>PictureLink:</b><br>\n";
  echo "< href=\"$list_url/in.php?site=$id\" target=\"_blank\"&gt<br>img src=\"http://www.yourdomain.com/vote_image2.gif\" alt=\"Enter $list_name and Vote for this site !!!\" border=0&gt&lt/a&gt\n";
  echo "<p><center><img src=\"$voteimage_1\"><br>This is the image. Please save it on your server.<br>(Right mouseclick - Save as ...)</center><br>\n";
  }

if ($voteimage_2) {
  echo "<p><hr><b><li>PictureLink 2:</b><br>\n";
  echo "< href=\"$list_url/in.php?site=$id\" target=\"_blank\"&gt<br>img src=\"http://www.yourdomain.com/vote_image2.gif\" alt=\"Enter $list_name and Vote for this site !!!\" border=0&gt&lt/a&gt\n";
  echo "<p><center><img src=\"$voteimage_2\"><br>This is the image. Please save it on your server.<br>(Right mouseclick - Save as ...)</center><br>\n";
  }

if ($voteimage_3) {
  echo "<p><hr><b><li>PictureLink 3:</b><br>\n";
  echo "< href=\"$list_url/in.php?site=$id\" target=\"_blank\"&gt<br>img src=\"http://www.yourdomain.com/vote_image2.gif\" alt=\"Enter $list_name and Vote for this site !!!\" border=0&gt&lt/a&gt\n";
  echo "<p><center><img src=\"$voteimage_3\"><br>This is the image. Please save it on your server.<br>(Right mouseclick - Save as ...)</center><br>\n";
  echo "<p>";
  }
}
it needs to be like this
PHP:
#  Help Language Forms
#################################################################################################

function help($id) {
    global $list_name,$list_url,$voteimage_1,$voteimage_2,$voteimage_3;

echo "<hr><b><li>TextLink:</b><br>";
echo "<a href=\"$list_url/in.php?site=$id\" target=\"_blank\">$list_name&lt/a&gt\n";


if ($voteimage_1) {
  echo "<p><hr><b><li>PictureLink:</b><br>\n";
  echo "<a href=\"$list_url/in.php?site=$id\" target=\"_blank\"&gt<br><img src=\"http://www.yourdomain.com/vote_image2.gif\" alt=\"Enter $list_name and Vote for this site !!!\" border=0&gt&lt/a&gt\n";
  echo "<p><center><img src=\"$voteimage_1\"><br>This is the image. Please save it on your server.<br>(Right mouseclick - Save as ...)</center><br>\n";
  }

if ($voteimage_2) {
  echo "<p><hr><b><li>PictureLink 2:</b><br>\n";
  echo "<a href=\"$list_url/in.php?site=$id\" target=\"_blank\"&gt<br><img src=\"http://www.yourdomain.com/vote_image2.gif\" alt=\"Enter $list_name and Vote for this site !!!\" border=0&gt&lt/a&gt\n";
  echo "<p><center><img src=\"$voteimage_2\"><br>This is the image. Please save it on your server.<br>(Right mouseclick - Save as ...)</center><br>\n";
  }

if ($voteimage_3) {
  echo "<p><hr><b><li>PictureLink 3:</b><br>\n";
  echo "<a href=\"$list_url/in.php?site=$id\" target=\"_blank\"&gt<br><img src=\"http://www.yourdomain.com/vote_image2.gif\" alt=\"Enter $list_name and Vote for this site !!!\" border=0&gt&lt/a&gt\n";
  echo "<p><center><img src=\"$voteimage_3\"><br>This is the image. Please save it on your server.<br>(Right mouseclick - Save as ...)</center><br>\n";
  echo "<p>";
  }
}
ive tried the code you posted up top but it caused a syntax error

any more suggestions
 
also a big tip here for coders

its annoying keep placing slashes before " like so \"

if you use single quotes you do not need to place your backslashes throughout you script, examples below

echo "Here are the poor \" quotes wraped in \" \""; // this is crap lool
echo 'Here are the poor " quotes wraped in " "'; // this you dont have to escape your quotes :)
 
Status
Not open for further replies.
Back
Top