Bernie Q
Bernie Q

Reputation: 1

Unexpected trailing slash

This the code I use to create a link:

<a href="http://www.ad_delete.php?id=<?php echo $row['id'] ?>">Delete</a>

But the result contains a slash before the query string:

<a href="http://www.ad_delete.php/?id=1">Delete</a>
                                 ^
                                 |
                                 Here

What gives?

Upvotes: 0

Views: 93

Answers (1)

darshandzend
darshandzend

Reputation: 394

Okay. Are you sure your url is correct? AFAIK, It couldn't be http://www.ad_delete.php

it could either be www.ad_delete .com/foo.php

or /ad_delete.php

For both the later cases, appending url with ?id=$row works.

phpFiddle http://phpfiddle.org/main/code/11m-3ja

Upvotes: 1

Related Questions