Alejo_Blue
Alejo_Blue

Reputation: 615

IMG control isn't showing image from internet

My question is pretty simple. In my website, I need to display an image from the Internet which I've stored in my dropbox account. Here's how I've tried to do that:

<img src="https://www.dropbox.com/sc/bf4rn63mgmfv1ry/kZmd3jzJGT">

But this doesn't show anything! I can't understand why; can anyone help explain this? Thanks in advance!

############################################################################################
Don't pay attention to this

<div class="span6">
    <img src="https://www.dropbox.com/sc/bf4rn63mgmfv1ry/kZmd3jzJGT">
    <form method="POST" name="form-signin" action="../mtto_users/add_users.php" enctype="multipart/form-data">
        <div class="table-responsive">
            <table class="table">                                                                                                           
                <tr>
                    <tr>
                        <center><input type="file" name="foto" id="fileInput" class="file-input uniform_on"> </center>
                        <tr>
                            <td><input type="text" name="nombre" placeholder=" Ingrese su nombre" required>&nbsp;&nbsp;
                            <td><input type="text" name="usuario" placeholder=" Ingrese un Usuario" required>
                        <tr>
                            <td><input type="password" name="pass" placeholder=" Ingrese una contraseña" required>&nbsp;
                            <td><input type="password" name="pass2" placeholder=" Reingrese contraseña" required>
                        <tr>
                            <td><input type="text" name="correo" placeholder="Ingrese su correo" required>&nbsp;                                
                            <td>
                                <select class="form-control" name="selector">
                                    <?php 
                                    $query = mysql_query("select * from tipo_usuario");
                                    while($dato = mysql_fetch_assoc($query)) {
                                        # code...
                                        echo '<option name="'.$dato['tipo_usuario'].'">';
                                        echo $dato['tipo_usuario'].'</option>';
                                    }
                                    ?>
                                </select>
                        <tr>
                            <td>
                                <select class="form-control" name="selector2">
                                    <option></option>
                                    <?php 
                                        $query = mysql_query("select * from hotel");
                                        while($datos = mysql_fetch_assoc($query)){
                                            echo '<option name="'.$datos['nombre_hotel'].'">';
                                            echo $datos['nombre_hotel'].'</option>';
                                        }
                                    ?>
                                </select>
                            <td>
                            <center><button class="btn btn-info btn-block" class="btn btn-info">Guardar 
            </table>
    </div>
</form>

Upvotes: 0

Views: 50

Answers (2)

Amit Joki
Amit Joki

Reputation: 59292

Because that is just a page which has your image.

Your actual tag should be:

<img src="https://photos-3.dropbox.com/t/0/AAA1DQWOPegw_DU8U9_OXOB6txCwIxwg2xFWXVIi986plA/12/48488057/jpeg/1024x768/3/1397019600/0/2/Image.jpg/ei4yXTf9KTZLkqWdhML4tx2hhFFmQXvJqOx3Hyhb0c4">

Demo

Upvotes: 1

cf-
cf-

Reputation: 8876

The problem is that https://www.dropbox.com/sc/bf4rn63mgmfv1ry/kZmd3jzJGT is not the link to your image; it's the link to a Dropbox page set up to show your image. There's no great way to get the actual link to your image thanks to what appears to be restrictions set up by Dropbox, but I got the full link anyway by dragging your image into a new tab.

The actual URL you want is https://photos-3.dropbox.com/t/0/AAA1DQWOPegw_DU8U9_OXOB6txCwIxwg2xFWXVIi986plA/12/48488057/jpeg/1024x768/3/1397019600/0/2/Image.jpg/ei4yXTf9KTZLkqWdhML4tx2hhFFmQXvJqOx3Hyhb0c4, and a quick test using

<img src="https://photos-3.dropbox.com/t/0/AAA1DQWOPegw_DU8U9_OXOB6txCwIxwg2xFWXVIi986plA/12/48488057/jpeg/1024x768/3/1397019600/0/2/Image.jpg/ei4yXTf9KTZLkqWdhML4tx2hhFFmQXvJqOx3Hyhb0c4" />

works as expected.

Upvotes: 1

Related Questions