• Home
  • Forum
  • Fare Web
  • PHP

Estrarre dati da tabella mysql [era:Sto benedetto php]

  • Creatore Discussione Creatore Discussione rostrato
  • Data di inizio Data di inizio 22 Set 2012
Prec.
  • 1
  • 2
Primo Prec. 2 di 2
R

rostrato

Utente Attivo
20 Set 2012
34
0
0
  • 23 Set 2012
  • #21
Grazie ragazzi.Ricominciando dall'inizio si e' risolto tutto,forse c'era script riportato male
 
R

rostrato

Utente Attivo
20 Set 2012
34
0
0
  • 26 Set 2012
  • #22
Salve ragazzi chiedo ancora aiuto perche' sono in panne.

Sto provando a creare una pagina php tramite una tabella a video mi restituisca tre colonne: Quantita' - Descrizione - Totale.
La quantita' (qta_venduta) e' inserita in una colonna del db nella tabella articoli(dove ovviamente sono inseriti anche gli articoli degli sposi non selezionati) la descrizione (descrizione) e' sempre nella stessa tabella e totale dovrei ricavarlo dato che nella tabella articoli e' presente il prezzo del singolo oggetto.
In pratica la tabella deve contenere tre colonne (Quantita - Descrizione - Totale) e per ogni singolo articolo (riga della tabella) dovrebbe uscire a video la quantita' totale di qell'articolo,la sua descrizione e il totale in funzione della quantita' venduta.
Ragazzi sono propio out.
Di seguito posto quello che son riuscito a fare nella pagina php
PHP:
<?
include("area_riservata.php");
require ("../include/valori.php");

?>

<br />

<center>I campi contrassegnati in <strong class="obbligatorio">verde *</strong> sono obbligatori</center>

<br /><br />

<form action="<?php $PHP_SELF ?>" method="POST" enctype="multipart/form-data"> 
                                                                                                                              
<fieldset class="form_admin">
                                                  
<legend>Coppia di Sposi *</legend>

<div id="form_admin">

<center>

 <span class="obbligatorio">
         
        <select name="id_lista">
        
        <option value=""></option>
        
               <? 
				
				require ("../include/valori.php");
				mysql_connect("$DBHost","$DBUser","$DBPass");
				mysql_select_db("$DBName");
				

				$result2=mysql_query("SELECT * FROM sposi ORDER BY id DESC");
				while ($row2= mysql_fetch_array ($result2)) { 
				?>
				<option value="<? echo $row2['id'] ?>" <? if ($id_lista==$row2['id']){ echo 'selected="selected"'; } ?> /><? echo html_entity_decode($row2['nome_sposo'])." - ".html_entity_decode($row2['nome_sposa']);  ?></option>  
                <? 
				}	
				?>
		        
        </select>

</span>
</center>

</div>
 
</fieldset>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Amministrazione</title>
</head>
<link href="../css/admin.css" rel="stylesheet" type="text/css" />

<body>
<div id="page">

		<div class="img_page"></div>
        
        
        <div class="form_page">
        
												 <h1><a href="index.php">Pannello d'Amministrazione</a></h1>
                                                 
                                                 <h3><strong>Venduto lista</strong>															
<?php include "footer.php" ?>

</body>
</html>

</body>
</html>
 

criric

Super Moderatore
Membro dello Staff
SUPER MOD
MOD
21 Ago 2010
5.606
54
48
TN
  • 26 Set 2012
  • #23
l'html è sbagliato
esempio di pagina
HTML:
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <!-- tutto l'output va tra questi tag-->
    </body>
</html>
Non puoi scrivere niente al di fuori dei tag body e head

Sistema l'html e poi apri una nuova discussione
nuovo problema = nuova discussione
 
Prec.
  • 1
  • 2
Primo Prec. 2 di 2
Devi accedere o registrarti per poter rispondere.

Discussioni simili

E
Estrarre dati da doppia tabella, banale ma non sempre
  • egidiogelli
  • 31 Dic 2021
  • PHP
Risposte
1
Visite
1K
PHP 4 Gen 2022
zorro
S
[PHP] Estrarre dati da tabella e fare la media ad intervalli di tempo
  • samurai.sette
  • 9 Nov 2019
  • PHP
Risposte
11
Visite
3K
PHP 4 Ott 2023
samurai.sette
S
S
[PHP] Estrarre dati tabella in diversi array
  • samurai.sette
  • 13 Mag 2019
  • PHP
Risposte
2
Visite
2K
PHP 14 Mag 2019
samurai.sette
S
Z
[VB.NET] Leggere pagina HTML ed estrarre dati da tabella
  • ZumbaMan
  • 21 Mar 2014
  • .NET Framework
Risposte
1
Visite
3K
.NET Framework 25 Mar 2014
Vins
V
M
Php+MySql: Estrarre dati da tabella e consentire all'utente di modificare un valore 'in linea'
  • malela
  • 20 Mar 2014
  • PHP
Risposte
6
Visite
8K
PHP 24 Mar 2014
malela
M
B
Estrarre più dati da una tabella
  • Bruschetta95
  • 15 Feb 2014
  • PHP
Risposte
2
Visite
1K
PHP 17 Feb 2014
Longo8
F
Estrarre dati da tabella javascript
  • f19
  • 11 Feb 2012
  • HTML e CSS
Risposte
0
Visite
3K
HTML e CSS 11 Feb 2012
f19
F
L
Estrarre dati da tabella mysql
  • leon-kennedy
  • 23 Nov 2010
  • PHP
Risposte
16
Visite
5K
PHP 30 Nov 2010
leon-kennedy
L
estrarre dati da una tabella e riscriverli su di un altra
  • Monital
  • 11 Lug 2010
  • PHP
Risposte
5
Visite
3K
PHP 29 Lug 2010
Monital
B
Estrarre dati da database e ordinarli in tabella...
  • Bivio
  • 20 Mag 2010
  • PHP
  • 2
Risposte
20
Visite
10K
PHP 10 Giu 2010
borgo italia
P
Non riesco ad estrarre dati da doppia tabella
  • pazzomania
  • 28 Lug 2007
  • PHP
Risposte
2
Visite
1K
PHP 30 Lug 2007
Eliox
Come Estrarre dati da db wordpress e richiamarli in html esterno
  • peppe0703
  • 13 Lug 2022
  • HTML e CSS
Risposte
0
Visite
2K
HTML e CSS 13 Lug 2022
peppe0703
C
Estrarre dati stringa Sql
  • carale92
  • 31 Lug 2020
  • Database
Risposte
1
Visite
2K
Database 31 Lug 2020
carale92
C
M
Estrarre dati da un database
  • MrGatomM
  • 10 Gen 2020
  • PHP
Risposte
2
Visite
615
PHP 13 Gen 2020
Max 1
M
Estrarre dati da una select HTML
  • maxus68
  • 6 Dic 2019
  • PHP
Risposte
3
Visite
4K
PHP 9 Dic 2019
marino51
D
[WordPress] come fare per estrarre dati da un db MySQL tramite una form e visualizzare il risultato
  • dariotoby
  • 25 Dic 2018
  • WordPress
Risposte
0
Visite
3K
WordPress 25 Dic 2018
dariotoby
D
[PHP] estrarre dati singoli
  • trattorino
  • 16 Giu 2018
  • PHP
Risposte
1
Visite
1K
PHP 17 Giu 2018
macus_adi
Z
Estrarre dati da un DB Mysql
  • zagorcico
  • 11 Mag 2018
  • PHP
Risposte
4
Visite
5K
PHP 4 Giu 2019
Tommy03
S
[PHP] Estrarre dati colonna in una stringa
  • samurai.sette
  • 13 Apr 2018
  • PHP
Risposte
6
Visite
3K
PHP 15 Apr 2018
samurai.sette
S
S
[PHP] estrarre dati sito web protetto con username e password
  • solari77
  • 5 Apr 2018
  • PHP
Risposte
13
Visite
5K
PHP 12 Apr 2018
macus_adi
Condividi:
Facebook X (Twitter) LinkedIn WhatsApp e-mail Condividi Link
  • Home
  • Forum
  • Fare Web
  • PHP
  • Italiano
  • Termini e condizioni d'uso del sito
  • Policy Privacy
  • Aiuto
  • Home
Community platform by XenForo® © 2010-2024 XenForo Ltd. | Traduzione a cura di XenForo Italia
Menu
Accedi

Registrati

  • Home
  • Forum
    • Nuovi Messaggi
    • Cerca...
  • Novità
    • Featured content
    • Nuovi Messaggi
    • Ultime Attività
X

Privacy & Transparency

We use cookies and similar technologies for the following purposes:

  • Personalized ads and content
  • Content measurement and audience insights

Do you accept cookies and these technologies?

X

Privacy & Transparency

We use cookies and similar technologies for the following purposes:

  • Personalized ads and content
  • Content measurement and audience insights

Do you accept cookies and these technologies?