Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi A - F > Basi di dati ~ comunicazione digitale > ES LABORATORIO prontopizza?!
  Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
zenerh
.amico.

User info:
Registered: Nov 2007
Posts: 35 (0.01 al dì)
Location: bucci beach (south west milan)
Corso: comunicazione digitale
Anno: 1
Time Online: 17:24:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
ES LABORATORIO prontopizza?!

qualcuno può postare le soluzioni del primo esercizio prontopizza svolto in laboratorio? please..

31-03-2010 17:24
Click Here to See the Profile for zenerh Click here to Send zenerh a Private Message Find more posts by zenerh Add zenerh to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
zenerh
.amico.

User info:
Registered: Nov 2007
Posts: 35 (0.01 al dì)
Location: bucci beach (south west milan)
Corso: comunicazione digitale
Anno: 1
Time Online: 17:24:05: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

prontopizza vabè...
ora sto provando a fare l'esercizio1 di lab04.pdf (l'ultima lezione di labo)
e non va..help!


se inserisco in login.html
id: 0105552200
pw: pwd ( che dovrebbe essere uguale per tutti e 3 i clienti, giusto?)



login1.php---> non mi dà alcun risultato :( suggerimenti?

<?php

// Lettura da variabili globali dei valori passati in post
$usr = $_POST["user"];
$pass = $_POST["pwd"];

echo "ho letto: '.$usr' e '.$pass'";

//mi connetto al db sul mio pc nome e psw sn diversi sono i miei
$con1 = pg_connect("host=localhost port=5432 dbname=gestinf10 user=postgres password=*****");
if (!$con1)
{
die('Non posso creare la connessione: ');
}



//eseguo query ed estraggo dati con
//VERIFICO SE CLIENTE ESISTE NELLA BASE DI DATI
$query = "SELECT * FORM Cliente WHERE telC='$usr' AND password='$pass'"
$query_res = pg_query ($con1,$query);


//leggo prima riga del risultato

$row = pg_fetch_assoc($query_res);

if(!$row) {
echo "nome utente e pass errati";
}
else {
//memorizzo variabili di sess

session_start();
$_cognome = $row["cognome"];

$_SESSION["cognome"]= $cognome;


echo 'nome e pass corretti. <A href= "step2.php">visualizza i tuoi dati.</A>';

}

//controllo se la query funzia


print_r($row); // stampa tutto l'array (se nome e pass sono sbagliati stampa array vuoto)





?>

07-04-2010 17:39
Click Here to See the Profile for zenerh Click here to Send zenerh a Private Message Find more posts by zenerh Add zenerh to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
gae84
.illuminato.

User info:
Registered: Jun 2005
Posts: 226 (0.03 al dì)
Location: Cesano Boscone
Corso: comunicazione digitale
Anno: sempre più fuori corso
Time Online: 16 Days, 14:49:51 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

-session_start() deve essere eseguito prima che venga mandato in output qualunque altro tag html
-rivedi la query, hai messo FORM al posto di FROM

08-04-2010 09:08
Click Here to See the Profile for gae84 Click here to Send gae84 a Private Message Find more posts by gae84 Add gae84 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 05:26.    Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.061 seconds (54.47% PHP - 45.53% MySQL) con 25 query.