Visualizzazione dei risultati da 1 a 3 su 3

Discussione: Iframe dinamico

  1. #1
    Utente di HTML.it
    Registrato dal
    Nov 2019
    Messaggi
    5

    Iframe dinamico

    Ciao a tutti
    avrei bisogno di sapere come cambiare questo valore 123456

    <iframe src="https://clustdoc.com/s/273658-272411-271775-5d8128a3cc927/start?ref=123456&embedded=1&with_logo=0&with_heade r=0&url=https://meetandcook.it" frameborder="" height="800" width="100%"></iframe>Questo è come dev'essere ma 123456 deve essere il parametro dinamico get, preso dall'url e chiamato in"ref".

    Grazie a tutti

  2. #2

  3. #3
    Ciao, usando PHP, prelevi dall'url il valore ref:

    codice:
    <?php
    if (isset($_GET['ref'])) {
        $ref = $_GET['ref'];
    }
    ?>

    poi se la variabile esiste, aggiungi il tuo iframe con il codice ref:

    codice:
    <?php if (isset($ref)) { ?>
    <iframe  src="https://clustdoc.com/s/273658-272411-271775-5d8128a3cc927/start?ref=<?php echo $ref; ?>&embedded=1&with_logo=0&with_heade   r=0&url=https://meetandcook.it" frameborder="" height="800"  width="100%"></iframe>
    <?php } ?>
    Ultima modifica di DavideMancuso; 11-12-2019 a 11:28

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.