Navigazione

    Privacy - Termini e condizioni
    © 2020 Search On Media Group S.r.l.
    • Registrati
    • Accedi
    • CATEGORIES
    • Discussioni
    • Non letti
    • Recenti
    • Hashtags
    • Popolare
    • Utenti
    • Stream
    • Interest
    • Categories
    1. Home
    2. rcayla
    3. Post
    R

    rcayla

    @rcayla

    • Profilo
    • Chi segue 0
    • Da chi è seguito 0
    • Discussioni 7
    • Post 47
    • Migliore 0
    • Gruppi 0
    Iscrizione Ultimo Accesso
    Età 30
    0
    Reputazione
    47
    Post
    0
    Visite al profilo
    0
    Da chi è seguito
    0
    Chi segue
    User

    Post creati da rcayla

    • Undefined index

      Salve, non riesco a venire a capo di un errore 😞

      Questo è l'errore -> Notice: Undefined index: 2 in D:\inetpub\webs\davanzati_test\models\booking_model.php on line 40

      [PHP]$this->selected = $_SESSION['ava'][$_POST['t']];[/PHP]

      Questo il codice, mentre invece se faccio var_dump() di $_SESSION['ava'] ecco cosa appare:
      [PHP]array(1) { [2]=> array(3) { ["tipo"]=> string(1) "2" ["prezzo"]=> string(3) "188" ["stanze"]=> array(2) { [0]=> string(3) "301" [1]=> string(3) "306" } } }[/PHP]

      Potete aiutarmi?

      postato in Coding
      R
      rcayla
    • RE: Valori comuni in un array

      Ho risolto, grazie lo stesso.

      postato in Coding
      R
      rcayla
    • Valori comuni in un array

      Salve a tutti,
      avrei bisogno di un aiuto.

      Ho un array come questo qui sotto, che mi indica delle camere disponibile in un certo lasso di tempo.
      Ogni indice indica un giorno.

      [PHP]
      Array
      (
      [0] => Array
      (
      [0] => 203
      [1] => 212
      [2] => 211
      )

                      [1] => Array
                          (
                              [0] => 212
                              [1] => 211
                          )
      
                      [2] => Array
                          (
                              [0] => 203
                              [1] => 211
                          )
      
                  )
      

      [/PHP]

      Avrei bisogno di trovare una o più camere che sono disponibili tutti i giorni. Conosco la funzione array_intersect(), l'unico problema è che gli array da confrontare possono essere fino a 14, cioè fino a 14 giorni richiesti dal cliente.

      C'è qualche modo di velocizzare la procedura, oppure devo fare un if per ogni giorno?

      postato in Coding
      R
      rcayla
    • RE: PHP dentro tabella HTML. Come si fa?

      Allora, se nel php.ini hai gli short_tag abilitati puoi fare così:
      [PHP]<tr>
      <td><?=$nome?></td>
      </tr>[/PHP]
      Altrimenti devi fare così:
      [PHP]<tr>
      <td>
      <?php
      echo $nome;
      ?>
      </td>
      </tr>[/PHP]

      postato in Coding
      R
      rcayla
    • RE: una funzione che non parte :(

      Se non posti il codice è difficile aiutarti...

      EDIT: Ho visto ora il codice alla pagina che hai linkato.
      Hai provato a mettere $debug = true?

      postato in Coding
      R
      rcayla
    • RE: Recupero dati da pagina php

      Basta che copi il codice nella risposta.
      L'importante è modificare i link che sono nel codice in questa maniera: hp://*.

      postato in Coding
      R
      rcayla
    • RE: Recupero dati da pagina php

      EDIT: Avevo capito male la domamnda.
      Si la soluzione migliore è tramite $_GET[] oppure con le sessioni.

      postato in Coding
      R
      rcayla
    • RE: XAMPP &amp; Siti in locale

      In questa maniera puntano tutti alla directory principale. 😕

      EDIT: Ho fatto una modifica nel file Hosts e adesso funziona tutto, grazie mille 😃

      postato in Hosting e Cloud
      R
      rcayla
    • XAMPP &amp; Siti in locale

      Salve,
      Ho installato XAMPP su Windows 7, ed ho settato dei virtual host così da poter gestire più siti.
      Adesso il problema è che qualsiasi link che ho impostato nel file hots di windows mi punta alla stessa directory.

      Ecco qua le varie pagina:

      httpd-vhosts.conf

      #
      # Virtual Hosts
      #
      # If you want to maintain multiple domains/hostnames on your
      # machine you can setup VirtualHost containers for them. Most configurations
      # use only name-based virtual hosts so the server doesn't need to worry about
      # IP addresses. This is indicated by the asterisks in the directives below.
      #
      # Please see the documentation at 
      # <URL:h**p://httpd.apache.org/docs/2.2/vhosts/>
      # for further details before you try to setup virtual hosts.
      #
      # You may use the command line option '-S' to verify your virtual host
      # configuration.
      
      #
      # Use name-based virtual hosting.
      #
      ##NameVirtualHost *:80
      
      #
      # VirtualHost example:
      # Almost any Apache directive may go into a VirtualHost container.
      # The first VirtualHost section is used for all requests that do not
      # match a ServerName or ServerAlias in any <VirtualHost> block.
      #
      ##<VirtualHost *:80>
          ##ServerAdmin postmasterdummy-host.localhost
          ##DocumentRoot "C:/xampp/htdocs/dummy-host.localhost"
          ##ServerName dummy-host.localhost
          ##ServerAlias w w w.dummy-host.localhost
          ##ErrorLog "logs/dummy-host.localhost-error.log"
          ##CustomLog "logs/dummy-host.localhost-access.log" combined
      ##</VirtualHost>
      
      ##<VirtualHost *:80>
          ##ServerAdmin postmasterdummy-host2.localhost
          ##DocumentRoot "C:/xampp/htdocs/dummy-host2.localhost"
          ##ServerName dummy-host2.localhost
          ##ServerAlias w w w .dummy-host2.localhost
          ##ErrorLog "logs/dummy-host2.localhost-error.log"
          ##CustomLog "logs/dummy-host2.localhost-access.log" combined
      ##</VirtualHost>
      
      <VirtualHost *>
          DocumentRoot "C:/xampp/htdocs/site1/"
          ServerName s1.locale
      </VirtualHost>
      
      <VirtualHost *>
          DocumentRoot "C:/xampp/htdocs/site2/"
          ServerName s2.locale
      </VirtualHost>
      
      <VirtualHost *>
          DocumentRoot "C:/xampp/htdocs/site3/
          ServerName s3.locale
      </VirtualHost>
      

      File Hosts

      # Copyright (c) 1993-2009 Microsoft Corp.
      #
      # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
      #
      # This file contains the mappings of IP addresses to host names. Each
      # entry should be kept on an individual line. The IP address should
      # be placed in the first column followed by the corresponding host name.
      # The IP address and the host name should be separated by at least one
      # space.
      #
      # Additionally, comments (such as these) may be inserted on individual
      # lines or following the machine name denoted by a '#' symbol.
      #
      # For example:
      #
      #      102.54.94.97     rhino.acme.com          # source server
      #       38.25.63.10     x.acme.com              # x client host
      
      # localhost name resolution is handled within DNS itself.
      	127.0.0.1       localhost
      	::1             localhost
              127.0.0.1       s1.locale
              127.0.0.1       s2.locale
              127.0.0.1       s3.locale
      

      Potete aiutarmi a risolvere il problema? 😄

      postato in Hosting e Cloud
      R
      rcayla
    • RE: Controllo e-mail

      Riguardo i due campi vuoti è la stessa cosa dell'emmail errata, devi mettere un "exit;" dopo l'echo.
      Ecco il codice completo:
      [PHP]<?php
      $email=$_POST['email'];
      $pwd=$_POST['pwd'];
      $pwd_conferma=$_POST['pwd_conferma'];
      $radio=$_POST['radio'];

      // verifica campi obbligatori
      if(($email == '') ||($pwd == '')||($pwd_conferma=='') ||($radio == '') )
      {
      echo "Registrazione non riuscita <p>Compila tutti i campi obbligatori!</p>";
      exit;
      }
      //controllo e-mail
      if (preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)[.][a-zA-Z]{2,4}$/',$email)) {
      echo "e-mail esatta<br><br>";
      } else {
      echo "e-mail sbagliata<br><br>";
      exit;
      }
      //fine controllo e-mail
      if($pwd==$pwd_conferma)
      //registrazione
      $query=mysql_query("INSERT INTO utenti (email,password) VALUES('$email','$pwd')") or die (mysql_error());

      if($pwd == $pwd_conferma)
      {
      echo "Registrazione Riuscita<br><br>Ciao! $email <br><br>";
      }
      else
      {
      echo "Le password inserite non coincidono&nbsp<br><br>Riprova!<br><br>";
      }

      ?>[/PHP]

      postato in Coding
      R
      rcayla
    • RE: Controllo e-mail

      Il problema è che la funzione echo non interrompe lo script.
      Dovresti sostituire questo
      [PHP]echo "e-mail sbagliata<br><br>";[/PHP]
      con questo:
      [PHP]echo "e-mail sbagliata<br><br>";
      exit;[/PHP]

      postato in Coding
      R
      rcayla
    • Slash Finale

      Salve,
      ho creato questo codice per riscrivere gli URL del mio forum, in questo modo:
      /forum/1-nome-sezione/1-nome-topic/.
      Il problema è che se l'URL è così: /forum/1-nome-sezione/1-nome-topic non funziona, come posso risolvere??

      Ecco il codice:

      RewriteEngine On
      RewriteRule ^index.html$ index.php
      RewriteRule ^([0-9]+)-([^/]+)/$ view-forum.php?f=$1&titlef=$2
      RewriteRule ^([0-9]+)-([^/]+)/index([0-9]+)\.html$ view-forum.php?f=$1&titlef=$2&page=$3
      RewriteRule ^([0-9]+)-([^/]+)/new-thread\.html$ new-thread.php?f=$1&titlef=$2
      RewriteRule ^([0-9]+)-([^/]+)/([0-9]+)-([^/]+)/$ view-topic.php?f=$1&titlef=$2&t=$3&titlet=$4
      RewriteRule ^([0-9]+)-([^/]+)/([0-9]+)-([^/]+)/index([0-9]+)\.html$ view-topic.php?f=$1&titlef=$2&t=$3&titlet=$4&page=$5
      RewriteRule ^([0-9]+)-([^/]+)/([0-9]+)-([^/]+)/new-replay\.html$ new-replay.php?f=$1&titlef=$2&t=$3&titlet=$4
      
      postato in News Ufficiali da Connect.gt
      R
      rcayla
    • RE: Inserire un editor di testo.

      Sono riuscito a sistemare cancellando la cache del browser, forse si era impallato, il fatto di IE è che stavo visualizzando in modalità compatibilità, perciò con IE 8 funziona, con IE 7 no, grazie ancora! 🙂

      postato in Coding
      R
      rcayla
    • RE: Inserire un editor di testo.

      io ho messo così:
      [html]<head>
      ......
      <script src="tiny_mce/tiny_mce.js" language="javascript" type="text/javascript"></script>
      <script src="tiny_mce/tiny_call.js" language="javascript" type="text/javascript"></script>
      </head>[/html]
      La cosa strana è che adesso, per esempio, non visitavo la pagina da un po', e appena ci sono tornato l'editor si è visto subito.. Poi ho cambiato pagina, sono tornato a quella dell'editor e per vederlo ho dovuto premere f5..

      postato in Coding
      R
      rcayla
    • RE: Inserire un editor di testo.

      Prima era nella pagina il codice, adesso l'ho messo in una pagina a se e poi la richiamo, ma niente, si visualizza solo dopo aver premuto f5..

      Inoltre su IE non si vede proprio nemmeno con f5 😕

      postato in Coding
      R
      rcayla
    • RE: [Tutorial] Area privata

      Si è proprio quello il codice per una pagina riservata 🙂

      postato in Coding
      R
      rcayla
    • RE: Inserire un editor di testo.

      Salve,
      innanzitutto grazie, perchè questo post mi è stato molto utile 😄

      Adesso però mi sorge un problema, appena apro la pagina la textarea si vede senza editor ma premendo f5 l'editor appare, come mai? 😞

      postato in Coding
      R
      rcayla
    • RE: [Tutorial] Area privata

      Sostituisci questo:
      [PHP]die('Nome Utente o Password errati');[/PHP]
      Con questo:
      [PHP]die('Nome Utente o Password errati<br /><a href="/index.php">RIPROVA</a>');[/PHP]

      postato in Coding
      R
      rcayla
    • RE: [Tutorial] Area privata

      Significa che sono errati i dati di acceso al database, devi ricontrollare i dati inseriti nella pagina config.php.

      postato in Coding
      R
      rcayla
    • RE: Aiuuuuutooooo!! echo pagina e non stringa

      Puoi fare così:
      [PHP]<?php
      if(isset($_SESSION['email'] && isset($_SESSION['psw']))
      {
      //L'utente è loggato
      header('Location: pagina1.php');
      }
      else
      {
      //L'utente non è loggato
      header('Location: pagina2.php');
      }
      ?>
      [/PHP]
      In questa maniera poi dovresti mettere un controllo nella pagina1.php, se è loggato fa vedere la pagina altrimenti reindirizza in un altra pagina

      postato in Coding
      R
      rcayla