Salta al contenuto
  • CATEGORIES
  • La Community Connect.gt
  • Presentati alla Community
  • News Ufficiali da Connect.gt
  • Internet News
  • A Scuola Di
  • Digital Marketing
  • Intelligenza Artificiale
  • SEO & GEO
  • Web Marketing e Content
  • Google Analytics e Web Analytics
  • Google Ads & Advertising
  • YouTube
  • TikTok, Instagram e altri Social
  • Google Adsense, Affiliazioni e Guadagno
  • E-Commerce
  • Coding e Sistemistica
  • Help Center: consigli per il tuo progetto
  • Hosting e Cloud
  • Coding
  • CMS & Piattaforme Self-Hosted
  • Annunci e Collaborazioni
  • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
  • Collaborazioni WEB e Lavoro: offro e cerco
  • Impresa, Fisco e Leggi
  • Consulenza Legale e Professioni Web
  • Consulenza Fiscale, Imprese, Startup e P.Iva
  • Gli Off Topic
  • PC, Smartphone e altri Hardware
  • Tutti i Software
  • GT Fetish Cafè
  • Discussioni
  • 0 Non letti 0
  • Recenti
  • Hashtag
  • Popolare
  • Utenti
  • Privacy
  • Termini e condizioni
  • © 2026 Search On Media Group S.r.l.
Collassa
Connect.gt
Il network Search On
Connect.gt WMF AI Festival Accademia Advanced SEO Tool AgentCy Social Media Strategies Search Tech
Registrati Accedi
Connect.gt
Stream Interest Categorie Hashtag
  1. La community italiana di SEO, marketing digitale e AI
  2. Categorie
  3. Coding e Sistemistica
  4. Coding
  5. chat utente registrato

chat utente registrato

Pianificato Fissato Bloccato Spostato Coding
1 Post 1 Autori 185 Visualizzazioni 1 Seguito
  • Da Vecchi a Nuovi
  • Da Nuovi a Vecchi
  • Più Voti
Rispondi
  • Risposta alla discussione
Effettua l'accesso per rispondere
Questa discussione è stata eliminata. Solo gli utenti con diritti di gestione possono vederla.
  • I
    I
    imperor
    scritto su ultima modifica di imperor
    User Attivo 2
    #1
    chat utente registrato

    buongiorno ho creato una chat dove l'utente loggato può creare la sua chat e vedere la lista delle stanze create quando entro in chat riconosce il nome della chat ma quando scrivo in chat e do invio mi da pagina bianca non riesco a capire il perchè non inserisce il testo posto ciò che ho creato chiedo aiuto grazie

    <?php
        include "config.php";
    	include("auth_session.php");
    ?>
    <!doctype html>
    <html lang="it">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport"
              content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title><?php echo $lang['title'] ?></title>
        <link rel="stylesheet" href="bootstrap-4.0.0-dist/css/bootstrap.min.css">
    	<!-- Begin emoji-picker Stylesheets -->
        <link href="lib/css/emoji.css" rel="stylesheet">
        <!-- End emoji-picker Stylesheets -->
    	<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
    
        <!-- Begin emoji-picker JavaScript -->
        <script src="lib/js/config.js"></script>
        <script src="lib/js/util.js"></script>
        <script src="lib/js/jquery.emojiarea.js"></script>
        <script src="lib/js/emoji-picker.js"></script>
        <style type="text/css">
            .footer {
                left: 0;
                position: fixed;
                bottom: 0;
                text-align: center;
                color: white;
                width: 100%;
            }
        </style>
    </head>
    <body>
        <nav class="navbar navbar-expand-sm bg-dark navbar-dark">
            <ul class="navbar-nav">
                <li class="nav-item active">
                    <a class="nav-link" href="profilo.php"><?php echo $lang['home'] ?></a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="creachat.php"><?php echo $lang['pricing'] ?></a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#"><?php echo $lang['contact'] ?></a>
                </li>
            </ul>
        </nav>
        <div class="container" style="margin-top: 100px;">
            <div class="row justify-content-center">
                <div class="col-md-6 col-md-offset-3 text-center">
                    <h1><?php echo $lang['title'] ?></h1>	                
    			  </div>
    			   		 <?php
    						include('db.php');
    						
    						$id = $_GET['id'];
    
    						$query=mysqli_query($con,"SELECT chatname FROM chat WHERE chatname = '$id' ");
    						while($row=mysqli_fetch_array($query)){
    							
    							
    						?>  
                          
    					 
    
    
                             <?php 
    					include ("db.php");
    					
    					
    					if(!$con)
    					{
    						die(mysqli_error());
    					}
    					
    					if(isset($_POST['submit']))
    					{
    						$id = $_POST['id'];
    						$msg = trim($_POST['msg']);
    						
    						$sql = "insert into `chat` (chatname, msg, name) values (chatname='$id', '$msg' , '".$_SESSION['name']."', NOW())";
    						$rs = mysqli_query($con, $sql);
    						$affectedRows = mysqli_affected_rows($con);
    						
    						if($affectedRows == 1)
    						{
    							$successMsg = "Record has been saved successfully";
    						}
    					}
    					?>
                          						
                </div>
    			 
    				
                <div>
    			
                    <div class="panel panel-default" style="height: 400px;">
                        <div style="height:10px;"></div>
                        <span style="margin-left:10px;"><?php echo $row['chatname']; ?></span><br>
                        <span style="font-size:10px; margin-left:10px;"><i>---------------------------------------------</i></span>
                        <div style="height:10px;"></div>
                        <div id="msg" style="margin-left:10px; max-height:320px; overflow-y:scroll;">
    					           <?php
    								include('db.php');
    								$id = $_GET['id'];
    								$query=mysqli_query($con,"SELECT id, chatname, msg, name FROM chat WHERE chatname='$id' ");
    								while($row=mysqli_fetch_array($query)){
    								{
    								
    								 echo $row['name'] ." ". $row['msg'] ."<br />";
    								}
    								?>    
                        </div>
                    </div>
                    <div class="container">
                         <form method="post" action="chatname.php">
                        <p class="lead emoji-picker-container">
                         <input type="text" name="msg" id="msg" class="form-control" placeholder="Di la tua"data-emojiable="true">
                        </p>
                         <input type="hidden" value="<?= $_SESSION['name'] ?>">  
                          <input type="submit" name="submit" value="invia">
                         </form>
                    </div>
               </div>
    		</div>
                    	 
             <script>
    				const msg = document.getElementById('msg');
    
    				function appendMsg() {
    					const msg = document.getElementsByClassName('msg')[0];
    				  const newMsg = msg.cloneNode(true);
    				  msg.appendChild(newMsg);
    				}
    
    				function getMsg() {
    					// Prior to getting your msg.
    				  shouldScroll = msg.scrollTop + msg.clientHeight === msg.scrollHeight;
    				  /*
    				   * Get your msg, we'll just simulate it by appending a new one syncronously.
    				   */
    				  appendMsg();
    				  // After getting your msg.
    				  if (!shouldScroll) {
    					scrollToBottom();
    				  }
    				}
    
    				function scrollToBottom() {
    				  msg.scrollTop = msg.scrollHeight;
    				}
    
    				scrollToBottom();
    
    				setInterval(getMsg, 100);
    				</script>
                   <script>
    				  $(function() {
    					// Initializes and creates emoji set from sprite sheet
    					window.emojiPicker = new EmojiPicker({
    					  emojiable_selector: '[data-emojiable=true]',
    					  assetsPath: 'lib/img/',
    					  popupButtonClasses: 'fa fa-smile-o'
    					});
    					// Finds all elements with `emojiable_selector` and converts them to rich emoji input fields
    					// You may want to delay this step if you have dynamically created input fields that appear later in the loading process
    					// It can be called as many times as necessary; previously converted input fields will not be converted again
    					window.emojiPicker.discover();
    				  });
    				</script>
    				<?php
    								}
    							
    							?>
    		   </div>
    		  </div>
    		</div>
    	  </div>
              
                
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
            
            <?php
    								}
    							
    							?>    
    
                </div>
    		  </div>
    		</div>
    	  </div>
        
    </body>
    </html>
    
    1 Risposta Ultima Risposta
    Miglior risposta 0
    0

    Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.

    Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.

    Con il tuo contributo, questo post potrebbe essere ancora migliore 💗

    Registrati Accedi
    Rispondi
    • Risposta alla discussione
    Effettua l'accesso per rispondere
    • Da Vecchi a Nuovi
    • Da Nuovi a Vecchi
    • Più Voti


    • Accedi

    • Non hai un account? Registrati

    • Accedi o registrati per effettuare la ricerca.
    • Primo post
      Ultimo post
    Home Accedi Registrati
    Menu
    • CATEGORIES
    • La Community Connect.gt
    • Presentati alla Community
    • News Ufficiali da Connect.gt
    • Internet News
    • A Scuola Di
    • Digital Marketing
    • Intelligenza Artificiale
    • SEO & GEO
    • Web Marketing e Content
    • Google Analytics e Web Analytics
    • Google Ads & Advertising
    • YouTube
    • TikTok, Instagram e altri Social
    • Google Adsense, Affiliazioni e Guadagno
    • E-Commerce
    • Coding e Sistemistica
    • Help Center: consigli per il tuo progetto
    • Hosting e Cloud
    • Coding
    • CMS & Piattaforme Self-Hosted
    • Annunci e Collaborazioni
    • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
    • Collaborazioni WEB e Lavoro: offro e cerco
    • Impresa, Fisco e Leggi
    • Consulenza Legale e Professioni Web
    • Consulenza Fiscale, Imprese, Startup e P.Iva
    • Gli Off Topic
    • PC, Smartphone e altri Hardware
    • Tutti i Software
    • GT Fetish Cafè
    • Discussioni
    • Non letti 0
    • Recenti
    • Hashtag
    • Popolare
    • Utenti
    • Privacy
    • Termini e condizioni
    • © 2026 Search On Media Group S.r.l.