Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

link path puzzler

Status
Not open for further replies.

Bastien

Programmer
May 29, 2000
1,683
CA
Hi All

Working on a site and run into an interesting problem. in my code I have a link to a delete.php page.
Code:
$sHTML .= "<a href='delete.php?id=".$rows['file_id']."'>Delete File</a></td>";

What's funky is that when I click the link, the relative path is and I get a 404 (page not found error)

If I manually type http://www.sitename.ca/delete.php?id=1 then the delete works...

How can I resolve this?



Bastien

I wish my computer would do what I want it to do,
instead of what I tell it to do...
 
not sure how
can be a relative path.

it sounds like you have a slight dns issue which your host can resolve (or admin if you have the requisite access).

in php you can always hard code the statement, of course.

Code:
$sHTML .= "<a href=\"[URL unfurl="true"]http://www.sitename.ca/delete.php?id={$rows[/URL]['file_id']}\">Delete File</a></td>";
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top