/    Sign up×
Community /Pin to ProfileBookmark

Input text in frame and update the previous on submit

?

I have a page built in php using frames, in the right frame there is a link called °mod° that cahnges the frame to another containing a form that when the user fills out i want when they press submit to be returned to the original page and the information to have been updated

here is my full page code up to the mod button which is a link to another page that shows in the same frame as the original,

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
http://www.w3.org/TR/html4/loose.dtd“>
<html>
<head>

<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<title>Documento senza titolo</title>
<style type=”text/css”>
<!–
body {
margin-left: 25px;
}
–>
</style>

</head>

<body class=”testonormale”>
<p>Verbali del cantiere:
<p>
<table width=”100%” class=”testonormale” bordercolor=”#000000″ cellpadding=”0″ cellspacing=”0″ >

<?
$codicedata=daletacod(“$_POST[postg1]”, “$_POST[$postm1]”, “$_POST[$posta1]”);
$datains=daletacod(“$ngiorno”, “$mese”, “$anno”);

if ($elimina==”ON”) {
//scrivo nella tabella che il verbale è stato eliminato
$trovoid = explode(“_“, $nomefile);
$idverb = $trovoid[1];
$mod = “UPDATE verbali SET eliminato=’ON’, utente_elimina=’$_
SESSION[id]’, data_canc=’$datains’ where id=$idverb”;
mysql_query($mod);

//elimino il file fisicamente
$daeliminare = “docscantieri/$_SESSION[idcant]verbali/$nomefile.doc”;
unlink ($daeliminare);

}

// Seleziono dalla tabella verbali tutti i verbali creati per il cantiere in questione
$scrivi1 = mysql_query(“select * from verbali where idcant=’$_SESSION[idcant]’ and eliminato=’OFF'”);
while ($scrivi = mysql_fetch_array($scrivi1, MYSQL_ASSOC)) {
foreach ($scrivi as $nome => $valore){
if ($nome==”verbale”){
//convero il codice del verbale nel nome del verbale stesso
if ($valore==1) {$nomeverbale=”AllegatoIII”; }
if ($valore==2) {$nomeverbale=”COM-Richiesta_Art 3_comma 8″; }
if ($valore==3) {$nomeverbale=”COM-VerbaleArt3comma1″; }
if ($valore==4) {$nomeverbale=”COM-VerbaleArt3comma2″; }
if ($valore==5) {$nomeverbale=”COM-VerbaleArt3comma6″; }
if ($valore==6) {$nomeverbale=”CSE-ComunicazioneAlCommittente”; }
if ($valore==7) {$nomeverbale=”CSE-ComunicazioneOrganiVigilanza”; }
if ($valore==8) {$nomeverbale=”CSE-ConvocazioneRiunione”; }
if ($valore==9) {$nomeverbale=”CSE-Idoneità_
POS”; }
if ($valore==10) {$nomeverbale=”CSE-ListaControlloAttività”; }
if ($valore==11) {$nomeverbale=”CSE-ListaControlloFA”; }
if ($valore==12) {$nomeverbale=”CSE-ListaControlloPOS”; }
if ($valore==13) {$nomeverbale=”CSE-ListaControlloPSC-FA”; }
if ($valore==14) {$nomeverbale=”CSE-obbligat_fascicolo”; }
if ($valore==15) {$nomeverbale=”CSE-ProgrammaAttivitàCSE”; }
if ($valore==16) {$nomeverbale=”CSE-PropostaSospensioneLavori”; }
if ($valore==17) {$nomeverbale=”CSE-Segnalazione DirLav”; }
if ($valore==18) {$nomeverbale=”CSE-Segnalazione_USL”; }
if ($valore==19) {$nomeverbale=”CSE-SOPRALLUOGOPERIODICO”; }
if ($valore==20) {$nomeverbale=”CSE-VerbaleDiSospensione”; }
if ($valore==21) {$nomeverbale=”CSE-VerbaleRiunione”; }
if ($valore==22) {$nomeverbale=”CSE-VerbaleSopralluogoCantiere”; }
if ($valore==23) {$nomeverbale=”CSP_COM-DerogaEmissioneRumore”; }
if ($valore==24) {$nomeverbale=”CSP_COM-NominaResponsabileLavori”; }
if ($valore==25) {$nomeverbale=”CSP-ConvocazioneRiunione”; }
if ($valore==26) {$nomeverbale=”CSP-ListaControlloAttività”; }
if ($valore==27) {$nomeverbale=”CSP-ListaControlloPSC-FA”; }
if ($valore==28) {$nomeverbale=”CSP-obbligatorieta_fascicolo”; }
if ($valore==29) {$nomeverbale=”CSP-TrasmissioneDocumentazione”; }
if ($valore==30) {$nomeverbale=”CSP-VerbaleRiunione”; }
if ($valore==31) {$nomeverbale=”CSP-VerbaleSopralluogoSito”; }
if ($valore==32) {$nomeverbale=”ModelloVuoto”; }
if ($valore==33) {$nomeverbale=”POS-DichiarazioneLA_PSC”; }
if ($valore==34) {$nomeverbale=”POS-DichiarazioneOrganico”; }
if ($valore==35) {$nomeverbale=”POS-DichImpArt3Comma8″; }
if ($valore==36) {$nomeverbale=”POS-ElencoSubAppaltatori”; }
if ($valore==37) {$nomeverbale=”POS-IMPAdempimenti626″; }
if ($valore==38) {$nomeverbale=”RICHIESTA_IDONEITA”; }
if ($valore==39) {$nomeverbale=”01_Lettera_Incarico”; }
if ($valore==40) {$nomeverbale=”02_Avviso_Licitaz_Privata”; }
if ($valore==41) { $nomeverbale=”03_Richiesta_termini_temp”; }
if ($valore==42) {$nomeverbale=”04_Presa_visione_appalto”; }
if ($valore==43) {$nomeverbale=”05_Dichiarazione_Antimafia”; }
if ($valore==44) {$nomeverbale=”06_Avvisi_ad_Opponendum”; }
if ($valore==45) {$nomeverbale=”07_Richiesta_invito_gara”; }
if ($valore==46) {$nomeverbale=”08_Offerta_licitaz_privata”; }
if ($valore==47) {$nomeverbale=”09_Scrittura_Privata”; }
if ($valore==48) {$nomeverbale=”10_Contratto_d’appalto”; }
if ($valore==49) {$nomeverbale=”11_Non_cessione_crediti”; }
if ($valore==50) {$nomeverbale=”12_Stipula_contratto”; }
if ($valore==51) {$nomeverbale=”13_Non_stipula_contratto”; }
if ($valore==52) {$nomeverbale=”14_Doc per_subappalto”; }
if ($valore==53) {$nomeverbale=”15_Autorizz_subappalto”; }
if ($valore==54) {$nomeverbale=”16_Ademp_assicurativi”; }
if ($valore==55) {$nomeverbale=”17_Verbale_di_consegna”; }
if ($valore==56) {$nomeverbale=”18_Verbale_di_consegna_urg”; }
if ($valore==57) {$nomeverbale=”19_Certif_inizio_lavori”; }
if ($valore==58) {$nomeverbale=”20_Verbale_di_pesa”; }
if ($valore==59) {$nomeverbale=”21_Verbale_sospensione”; }
if ($valore==60) {$nomeverbale=”22_Verbale_ripresa”; }
if ($valore==61) {$nomeverbale=”23_Richiesta_di_proroga”; }
if ($valore==62) {$nomeverbale=”24_Concessione_di_proroga”; }
if ($valore==63) {$nomeverbale=”25_Relazione_sulle_riserve”; }
if ($valore==64) {$nomeverbale=”26_Verbale_nuovi_prezzi”; }
if ($valore==65) {$nomeverbale=”27_Atto_di_sottomissione”; }
if ($valore==66) {$nomeverbale=”28_Certif_fine_lavori”; }
if ($valore==67) {$nomeverbale=”29_Certif_reg_esecuz”; }
if ($valore==68) {$nomeverbale=”30_Avviso_di_parcella”; }
if ($valore==69) {$nomeverbale=”31_Comunic_conto_finale”; }
if ($valore==70) {$nomeverbale=”32_Relazione_conto_finale”; }

}

// cerco tra i file creati quelli riferiti al cantiere in oggetto
if ($nome==”datacreazione”) {
$nomefile=(“_$scrivi[id]”);
$nomefile=(“$valore$nomefile”);

$datalettere=date(‘d F Y – G:i:s ‘,strftime (“$scrivi[datacreazione]”));
$data=daENaIT(“$datalettere”);
if ($scrivi[nomeverb]==””) {$nomeverb=$nomeverbale;} else {$nomeverb=$scrivi[nomeverb];}

if ($_GET[modnote]==”ON” and $_GET[coddata]==$scrivi[codverb]) {

$linkmodnote=(“
<form name=”forma” method=”post” action=”creaverbale.php?modificato=ON”>
<input type=”text” name=”$nomemod” class=”inputboxColored” >
<input type=”submit” name=”Submit” class=”inputboxColored” value=”Invia”>
</form>
| $data |
<a href=”creaverbale.php?elimina=ON&nomefile=$nomefile”>elimina</a>

“);
} else {
$cod = $scrivi[codverb];
$linkmodnote=(“
<a href=docscantieri/$_SESSION[idcant]verbali/$nomefile.doc target=”_blank”>$nomeverb</a> | <a href=”creaverbale.php?modnote=ON&coddata=$cod”>°mod°</a> | $data | <a href=”creaverbale.php?elimina=ON&nomefile=$nomefile”>elimina</a>
“);
}

print (” <tr>
<td>$linkmodnote</td>
</tr>
“);}
}
}

i hope u understand

thanks

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@David_HarrisonSep 24.2005 — Well that would be a PHP thing then, just grab the data submitted from the form and put it on the page, or am I missing something?
Copy linkTweet thisAlerts:
@aznchong91Sep 24.2005 — If you are going to do PHP, then post in the PHP forum to get a good answer, not javascript! No offense, but half these people in the Javascript forum don't even know what PHP is!
×

Success!

Help @claire_moore spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.15,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...