Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-30-2012, 05:18 PM   PM User | #1
doubledee
Regular Coder

 
doubledee's Avatar
 
Join Date: Mar 2011
Location: Arizona
Posts: 617
Thanks: 19
Thanked 0 Times in 0 Posts
doubledee has a little shameless behaviour in the past
Folders being prepended to my URL?!

I am noticing some strange behavior in the Tooltip regarding the URL that appears.

Here is some background...

In MySQL, I have this stored in the "summary" field...
Code:
Here are 5 Tips that will help you to know <a href="{url}">When to Hire a Consultant</a>
In my Article Listing page, I have this PHP in the HTML section...
PHP Code:
<?php
    
// ****************************************
    // Display Article Summaries in Section.    *
    // ****************************************
    
while (mysqli_stmt_fetch($stmt1)){
        
// Format Published On.
        
$publishedOn date('F j, Y'strtotime($publishedOn));

        echo 
"<div class='articleSummary'>
                <h3>$heading</h3>
                <a href=''>$image</a>
                <div class='date'>Published: $publishedOn</div>
                $summary
            </div>"
;
    }
?>
I am in the process of writing a function that will dynamically insert the proper URL into my Summary versus how I had it before which was it being hard-coded.

The problem...

When I hover over the link in the text...
Quote:
Here are 5 Tips that will help you to know When to Hire a Consultant
...I would just expect to see {url} since I stripped out the actual URL that was there before.

But instead, when I hover over the link I am seeing this...

local.debbie/management/{url}

Why is this happening??

Is it because my browser is seeing that I am on the page at http://local.debbie/management/ and so it just prepends that to {url} in the Tooltip??

Thanks,


Debbie
doubledee is offline   Reply With Quote
Old 09-30-2012, 06:15 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,648
Thanks: 4
Thanked 2,450 Times in 2,419 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
If you don't specify an absolute url, or a url with a starting path from the root, HTML assumes you mean from where you are. So yes, showing {url} appended to your current location is normal.
Fou-Lu is offline   Reply With Quote
Old 09-30-2012, 06:58 PM   PM User | #3
doubledee
Regular Coder

 
doubledee's Avatar
 
Join Date: Mar 2011
Location: Arizona
Posts: 617
Thanks: 19
Thanked 0 Times in 0 Posts
doubledee has a little shameless behaviour in the past
Quote:
Originally Posted by Fou-Lu View Post
If you don't specify an absolute url, or a url with a starting path from the root, HTML assumes you mean from where you are. So yes, showing {url} appended to your current location is normal.
Okay, thanks.


Debbie
doubledee is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:04 PM.


Advertisement
Log in to turn off these ads.