Hello,

I am trying to print a web address in $url_link, which is the instagram web address but it does not print a correct web address format. Any idea why?

home.blade.php

<label for="c7">
                        @if($user_setting->instagram_enable)

                        <?php if(Auth::check()) 
                             {
                             $url_link = Url('home/instagram');                 
                             }

                        else {

                            $domain = $_SERVER['SERVER_NAME'];
                            $user = User::where('domain', $domain)->first();       

                            $user_profile = UserProfile::where('user_id', $user->id)->first();
                            $url_link = "www.instagram.com/".$user_profile->ig_url;

                            }?>

                        <a href="http://".<?php echo $url_link; ?> data-tipe="instagram" data-content="" data-target="#content_desc" target="_blank">
Member Avatar for diafol
                    <a href="http://".<?php echo $url_link; ?> data-tipe="instagram" data-content="" data-target="#content_desc" target="_blank">

Should be

                    <a href="http://<? =$url_link?>"  data-tipe="instagram" data-content="" data-target="#content_desc" target="_blank">

You may have a typo on data-tipe (data-type) too but it may be correct for you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.