i am trying to build a link that looks like this:
Code: Select all
<a href="deleteItem.php?id=7">X</a>Code: Select all
echo("<a href='deleteItem.php?id=".$id."'>X</a>")
Code: Select all
<a href='deleteItem~id~4.php'>X</a>
Moderator: General Moderators
Code: Select all
<a href="deleteItem.php?id=7">X</a>Code: Select all
echo("<a href='deleteItem.php?id=".$id."'>X</a>")
Code: Select all
<a href='deleteItem~id~4.php'>X</a>
Is there some kind of php.ini setting that would cause this ?it2051229 wrote:I did a test but it rendered it correctly. Give more codes
ok gotcha... well heres the complete source code...califdon wrote:Well, you're right, that's what's in the source code. So in order to offer you any help, you'll need to supply the surrounding PHP code that is creating the links. More than just the one line. Obviously, the variable that you THINK contains just the ID must contain some other characters; the issue is where it's coming from.
Code: Select all
<?php
#PARSING THE XML FILE USING SIMPLEXML... for mor info google "SimpleXML"
#CREATING THE HANDLER
#
$xml = simplexml_load_file('file.xml');
#
#LOOP THROUGH THE <LINKGROUP> NODES
#
foreach($xml->linkGroup as $linkGroup)
{
$linkGroupTitle = $linkGroup['id'];
echo("<strong>Link Group: " . $linkGroupTitle . "</strong><br/>");
#
#REMOVE THE FIRST <linkItem> NODE
#
#unset($linkGroup->linkItem[0]);
echo("<ul>");
#
#LOOP THROUGH THE <LINKITEM> NODES (CHILD OF <LINKGROUP>
#
foreach($linkGroup->linkItem as $linkItem)
{
$id = $linkItem['id'];
$title = $linkItem->title;
$url = $linkItem->url;
$description = $linkItem->description;
?>
<li>
(ID <?php echo($id)?>)<?php echo($title)?><br>
<?php echo($description)?><br>
<a href="<?php echo($url)?>"><?php echo($url)?></a>
[<a href="deleteItem.php?id=<?php echo($id)?>">X</a>]<br><br>
</li>
<?php
#echo("<li>".$id.": ".$title.": ".$url." [<a href='deleteItem.php?id=".$id."'>X</a>]</li>");
}
echo("</ul>");
}
?>
<br>
<a href="addItem.php">Add another link</a>
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<linkCollection>
<linkGroup id="Photoshop">
<linkItem id="1">
<title>Google</title>
<description>This is the first link</description>
<url>www.google.com</url>
</linkItem>
<linkItem id="2">
<title>blairdee.info</title>
<description>This is the second link</description>
<url>www.blairdee.info</url>
</linkItem>
<linkItem id="3">
<title>Microsoft Windows 7 Website</title>
<description>This is the third link</description>
<url>www.microsoft.com/windows7</url>
</linkItem>
<linkItem id="4">
<title>Fandango</title>
<description>This is the fourth Link</description>
<url>www.fandango.com</url>
</linkItem>
</linkGroup>
</linkCollection>