13. januar 2006 - 22:06
Der er
24 kommentarer og 2 løsninger
redigering i sin profil
hej eksperter
jeg er ved at lave et profilsystem til et fodboldhold..
siden:
www.andreasbrun.dk/andreas/andreas.php jeg har bygget det op omkring en artikel fra webcafe.dk om hvordan min laver en gæstebog. det jeg har brug for nu er at rette koden så den ikke laver nye input (altså et nyt "indlæg") men derimod retter dem der i forvejen er i mysgl databasen.
når man så skal redigere sin profil, vil jeg gerne have at explorer henter dataene fra mysgl databasen i hver formular... hvordan gør man det??? er det "bare" i f.x. profilnavn:
<input type="text" name="profilnavn" <?php echo $profilnavn ?> size="30" maxsize="100"></font>
den fulde kode følger
på forhånd rigtig mange mange tak
Annonceindlæg fra HP
13. januar 2006 - 22:06
#1
<?php require("gbog-ting/design-funktioner.php"); # # Hvis du vil have "skrive-siden" til at se anderledes ud kan du bare ændre i HTMLen herunder. # ?> <form action="gem.php" method="post"> <div align="center"> <table border="1" width="600" id="table3" style="border-width: 0px" cellspacing="0" cellpadding="0"> <tr> <td style="border-style: none; border-width: medium" bgcolor="#669999"> <blockquote> <blockquote> <p><font size="6"><b>Profilnavn:</b></font><b><font size="6"> </font> <font size="2"> <input type="text" name="profilnavn" size="30" maxsize="100"></font></b></p> <p><font size="2"><b>3 ord om dig selv: </b></font> <input type="text" name="ord" size="46" maxsize="100"></p> </blockquote> </blockquote> </td> </tr> <tr> <td style="border-style: none; border-width: medium"> </td> </tr> <tr> <td style="border-style: none; border-width: medium"> <table border="1" width="100%" id="table4" style="border-width: 0px" bgcolor="#669999"> <tr> <td width="30%" style="border-style: none; border-width: medium" colspan="5" rowspan="9" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" width="15%" align="right"> <p align="right"><b><font size="2">navn</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="navn" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">trøjenummer</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="shirtno" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">favorit Position</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="position" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">favorit Spiller(e)</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="idol" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">favorit Klub(ber)</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="klub" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999"> <b>favorit changspiller</b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="favchang" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#669999" colspan="2"> </td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">ægteskabsstatus</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="status" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999"> <b><font size="2">børn</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="unger" size="36" maxsize="100"></font></b></td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" align="right" bgcolor="#669999"> </td> <td width="1%" style="border-style: none; border-width: medium" align="right" bgcolor="#669999"> </td> <td width="7%" style="border-style: none; border-width: medium" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" width="20%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#669999" colspan="2"> </td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> <b><font size="2">alder</font></b></td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"> </td> <td width="7%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"><b> <font size="2"> <input type="text" name="alder" size="4" maxsize="100"></font></b></td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="36%" align="right" bgcolor="#669999" height="21" colspan="2"> <b><font size="2">personlige Mål i SuperChang</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC" height="21"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" height="42" colspan="2" rowspan="2"><b> <font size="2"> <input type="text" name="personlig" size="36" maxsize="100"></font></b></td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> <b><font size="2">højde</font></b></td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"> </td> <td width="7%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"><b> <font size="2"> <input type="text" name="height" size="4" maxsize="100"></font></b></td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="36%" align="right" bgcolor="#669999" height="21" colspan="2"> </td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC" height="21"> </td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> <b><font size="2">vægt</font></b></td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"> </td> <td width="7%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"><b> <font size="2"> <input type="text" name="weight" size="4" maxsize="100"></font></b></td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="36%" align="right" bgcolor="#669999" height="21" colspan="2"> <b><font size="2">bedste minde fra SuperChang</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC" height="21"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" height="42" colspan="2" rowspan="2"> <input type="text" name="minde" size="36" maxsize="100"></td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> </td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> </td> <td width="7%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="20%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#669999" height="21"> </td> </tr> <tr> <td style="border-style: none; border-width: medium" align="right" colspan="9"> <p align="center"><b><font size="2"> <?php echo $navn; ?>'s Ord</font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" align="right" colspan="9" bgcolor="#FFFFFF"> <b><font size="2"> <textarea cols="71" rows="10" name="besked"></textarea></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="9"> <p align="center"><font size="2"><b>emailadresse: </b> </font> <input type="text" name="email" size="31" maxsize="100"></td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="9"> </td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="8"> <p align="center"><b><font color="#FF0000">Du kan godt ændre infoen uden at uploade et nyt profilbillede</font></b></td> <td style="border-style: none; border-width: medium" width="21%"> <p align="center"> <input type="submit" value="GEM" name="gem"></td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="9"> <table border="1" width="100%" id="table5" style="border-width: 0px" bgcolor="#669999"> <tr> <td style="border-style: none; border-width: medium" bgcolor="#FFFFFF"> </td> </tr> <tr> <td style="border-style: none; border-width: medium"> <iframe name="I1" src="andreas/upload.php" width="588" height="83" scrolling="no" align="center" border="0" frameborder="0"> Webbrowseren understøtter ikke indbyggede rammer eller er aktuelt konfigureret til ikke at vise indbyggede rammer. </iframe></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </div> <?php echo bund(); ?>
13. januar 2006 - 22:21
#2
<input type="text" name="profilnavn" value="<?php echo $profilnavn ?>" size="30" maxsize="100"></font>
13. januar 2006 - 22:23
#3
oh... takker kan du også hjælpe mig med det andet?
13. januar 2006 - 22:25
#4
hvilket?
13. januar 2006 - 22:26
#5
at den ikke laver nye input, men erstatter de gamle
13. januar 2006 - 22:28
#6
det er bare så min mysgl database ikke bliver voldsomt stor.
13. januar 2006 - 22:32
#7
det er et større projekt som jeg ikke ønsker at starte på nu
13. januar 2006 - 22:33
#8
det helt fint. indtil videre fungerer det jo også fremragende :-D
13. januar 2006 - 22:33
#9
men lad mig lige se din upload.php så vil jeg se på det ved lejlighed
13. januar 2006 - 22:35
#10
min upload.php er bare noget billede-halløj.. den har ikke noget med det her at gøre. men den anden fil der viser "resultaterne": altså "andreas.php" <?php require("./gbog-ting/mysql-funktioner.php"); require("./gbog-ting/design-funktioner.php"); require("./gbog-ting/indstillinger.php"); # # Vi skal have fat i vores variabler, uanset hvilken version af PHP der bruges # if(is_array($HTTP_GET_VARS)) { $start_nr = $HTTP_GET_VARS['start_nr']; } elseif (is_array($_GET)) { $start_nr = $_GET['start_nr']; } # # Når folk kigger på gBogen første gang har de ikke noget $start_nr, så vi giver dem et nul, # så de starter med det nyeste indlæg. # Hvis en skuummel gæst selv prøver at sætte $start_nr kan den ende med at blive under nul, # når man bruger navigationen. Hvis den er under nul laver vi den også om til nul, så # mysql ikke begynder at brokke sig over ugyldigt input # if(!$start_nr || $start_nr < 0) { $start_nr = 0; } # # Vi henter to ting ud af MySQL - først og fremmest alle de indlæg vi skal kigge på # men også en hurtig optælling af, hvor mange indlæg der er ialt. Det sidste skal vi # bruge når vi bygger "frem"- og "tilbage"-links. # # Der er ingen grund til at åbne databasen endnu - vi skal først lige have bygget # de to forespørgsler. # $sql = "select id, profilnavn, navn, alder, email, shirtno, position, idol, klub, status, unger, personlig, chang, minde, ord, besked, date_format(tid, '%e/%c %Y, %H:%i') as tiden from andreas order by tid desc limit $start_nr, $antal_ad_gangen"; $taeller_sql = "select count(*) as antal from andreas"; # # Nu åbner vi databasen, hiver informationerne ud og lukker med det samme igen. # Det er god skik at en forbindelse til database ikke er åben længere end højst nødvendigt. # # Abstraktionerne fra mysql-funktioner.php sørger for alt det grove arbejde og fejlhåndtering - dejligt. # aabn_forbindelse_og_vaelgdb(); $resultat = sql_spoerg_og_faa_svar($sql); $optaelling = sql_spoerg_og_faa_svar($taeller_sql); luk_forbindelse(); # # Her begynder det egentlig interesante - vi looper os igennem de enkelte indlæg # og skriver dem ud til skærmen. # # Hvis forespørgslen ikke har returneret nogle resultater, springer vi alt dette over. # if(count($resultat) < 1) { echo "Der er ingen info i databasen... <a href=\"rediger.php\">Rediger</a>"; } else { for($i=0;$i<count($resultat);$i++) { # # Med extract får vi smidt værdierne i variabler # extract($resultat[$i]); # # Vi brugte addslashes() da vi lagde tingene i databasen så for at få det til # at se læseligt ud, fjerne vi dem igen med stripslashes() # $profilnavn = stripslashes($profilnavn); $navn = stripslashes($navn); $alder = stripslashes($alder); $height = stripslashes($height); $weight = stripslashes($weight); $email = stripslashes($email); $shirtno = stripslashes($shirtno); $position = stripslashes($position); $idol = stripslashes($idol); $klub = stripslashes($klub); $favchang = stripslashes($favchang); $status = stripslashes($status); $unger = stripslashes($unger); $personlig = stripslashes($personlig); $chang = stripslashes($chang); $minde = stripslashes($minde); $ord = stripslashes($ord); $besked = stripslashes($besked); # # Hvis der ikke må bruges HTML fjerner vi lige alle tags med htmlentities() # if($html_p != "t") { $profilnavn = htmlentities($profilnavn); $navn = htmlentities($navn); $alder = htmlentities($alder); $height = htmlentities($height); $weight = htmlentities($weight); $email = htmlentities($email); $shirtno = htmlentities($shirtno); $position = htmlentities($position); $idol = htmlentities($idol); $klub = htmlentities($klub); $favchang = htmlentities($favchang); $status = htmlentities($status); $unger = htmlentities($unger); $personlig = htmlentities($personlig); $chang = htmlentities($chang); $minde = htmlentities($minde); $ord = htmlentities($ord); $besked = htmlentities($besked); } # # For at vi får linjeskift i HTML også, bruger vi nl2br til at skifte alle \n # ud med <br> $besked = nl2br($besked); # # Vi laver et simpelt check: Hvis emailen indeholder et snabel-a, så laver # vi det til en mailto: # # Dette er dog ingen garanti for, at emailen er gyldig. # if(ereg("@", $email)) { $email = "<a href=\"mailto:$email\">$navn</a>"; } # # Så er alt klart til browseren og vi spytter en tabel ud med denne besked. # Hvis du vil ændre markant i udseendet af din gæstebog, så er det # i blokken herunder det foregår. Du skal bare beholde de givne navne i # <input>-tagsene. # # Vi hopper lige ud af PHP-mode lidt, så vi er fri for at escape alle gåseøjnene. # ?> <div align="center"> <table border="1" width="600" id="table1" style="border-width: 0px" cellspacing="0" cellpadding="0"> <tr> <td style="border-style: none; border-width: medium" bgcolor="#669999"> <blockquote> <blockquote> <p><b><font size="6"><?php echo $shirtno; ?>. <?php echo $navn; ?></font></b></p> <p><b> <font size="2"><?php echo $ord; ?></font></b></p> </blockquote> </blockquote> </td> </tr> <tr> <td style="border-style: none; border-width: medium"> </td> </tr> <tr> <td style="border-style: none; border-width: medium"> <table border="1" width="100%" id="table2" style="border-width: 0px" bgcolor="#669999"> <tr> <td width="30%" style="border-style: none; border-width: medium" colspan="5" rowspan="9" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" width="23%" align="right"> <p align="right"><b><font size="2">navn</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="2%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"><?php echo $navn; ?></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="23%" align="right"> <b><font size="2">trøjenummer</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="2%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"><?php echo $shirtno; ?></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="23%" align="right"> <b><font size="2">favorit Position</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="2%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"><?php echo $position; ?></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="23%" align="right"> <b><font size="2">favorit Spiller(e)</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="2%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"><?php echo $idol; ?></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="23%" align="right"> <b><font size="2">favorit Klub(ber)</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="2%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"><?php echo $klub; ?></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="23%" align="right" bgcolor="#669999"> <b>favorit changspiller</b></td> <td style="border-style: none; border-width: medium" align="left" width="2%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"><?php echo $favchang; ?></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="23%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="2%" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#669999" colspan="2"><b> <font size="2"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="23%" align="right"> <b><font size="2">ægteskabsstatus</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="2%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"><?php echo $status; ?></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="23%" align="right" bgcolor="#669999"> <b><font size="2">børn</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="2%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"><?php echo $unger; ?></font></b></td> </tr> <tr> <td width="9%" style="border-style: none; border-width: medium" align="right" bgcolor="#669999"> </td> <td width="1%" style="border-style: none; border-width: medium" align="right" bgcolor="#669999"> </td> <td width="5%" style="border-style: none; border-width: medium" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" width="1%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" width="11%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" width="23%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="2%" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#669999" colspan="2"> </td> </tr> <tr> <td width="9%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> <b><font size="2">alder</font></b></td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"> </td> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"><b> <font size="2"><?php echo $alder; ?></font></b></td> <td style="border-style: none; border-width: medium" width="1%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="34%" align="right" bgcolor="#669999" height="21" colspan="2"> <b><font size="2">personlige Mål i SuperChang</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="2%" bgcolor="#99CCCC" height="21"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" height="42" colspan="2" rowspan="2"><b> <font size="2"><?php echo $personlig; ?></font></b></td> </tr> <tr> <td width="9%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> <b><font size="2">højde</font></b></td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"> </td> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"><b> <font size="2"><?php echo $h; ?></font></b></td> <td style="border-style: none; border-width: medium" width="1%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="34%" align="right" bgcolor="#669999" height="21" colspan="2"> </td> <td style="border-style: none; border-width: medium" align="left" width="2%" bgcolor="#99CCCC" height="21"> </td> </tr> <tr> <td width="9%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> <b><font size="2">vægt</font></b></td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"> </td> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"><b> <font size="2"><?php echo $v; ?></font></b></td> <td style="border-style: none; border-width: medium" width="1%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="34%" align="right" bgcolor="#669999" height="21" colspan="2"> <b><font size="2">bedste minde fra SuperChang</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="2%" bgcolor="#99CCCC" height="21"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" height="42" colspan="2" rowspan="2"><b> <font size="2"><?php echo $minde; ?></font></b></td> </tr> <tr> <td width="9%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> </td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> </td> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="1%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="11%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="23%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" align="left" width="2%" bgcolor="#669999" height="21"> </td> </tr> <tr> <td style="border-style: none; border-width: medium" align="right" colspan="9"> <p align="center"><b><font size="2"> <?php echo $navn; ?>'s Ord</font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" align="right" colspan="9" bgcolor="#FFFFFF"> <b><font size="2"><?php echo $besked; ?></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="9"> <p align="center"><b><font size="2">Skriv fanbreve til <?php echo $email; ?></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="9"> </td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="4"> <p align="center"> læst <?php include("hitcounter/count.php"); ?> gange</td> <td style="border-style: none; border-width: medium" colspan="4"> <p align="center">sidst redigeret: <b><font size="2"> <?php echo $tiden; ?></font></b></td> <td style="border-style: none; border-width: medium" width="24%"> <p align="center"><font color="#FF0000"><b> <a href="rediger.php">rediger</a></b></font></td> </tr> </table> </td> </tr> </table> </div> <?php # # Vi hopper tilbage i PHP-mode. # # Her slutter loopet og PHP springer tilbage og går hele turen igennem med den næste # besked. Når der ikke er flere indlæg i denne omgang går PHP videre. # } # # Her slutter if-else-konstruktionen der fanger, om der er nogle indlæg overhovedet. # } # # Og spytter den sidste stump HTML ud. # echo bund(); ?> husk på det er fra en guide.. derfor alle forklaringerne
13. januar 2006 - 22:36
#11
bund() er bare </body></html>
13. januar 2006 - 22:46
#12
vi har brug for at se den kode som indsætter data i databasen - det er den som skal ændres
13. januar 2006 - 23:10
#14
i din gem.php har du disse linier hvor du via en sql-sætning indsætter data i tabellen. $sql = "insert into andreas(ip, tid, profilnavn, navn, alder, height, weight, email, shirtno, position, idol, klub, favchang, status, unger, personlig, chang, minde, ord, besked) values('$ip',now(), '$profilnavn', '$navn', '$alder', '$height', '$weight', '$email', '$shirtno', '$position', '$idol', '$klub', '$favchang', '$status', '$unger', '$personlig', '$chang', '$minde', '$ord', '$besked')"; Istedet for at indsætte skal du opdatere. Dette gøres således: UPDATE andreas SET ip = '$ip', tid = now(), profilnavn = '$profilnavn', navn = '$navn',....... osv.
13. januar 2006 - 23:21
#15
arh... simple simple når man ved hvordan ;-)
13. januar 2006 - 23:27
#16
så hele den linie med "values" skal ikke være med?
13. januar 2006 - 23:37
#17
nej
13. januar 2006 - 23:38
#18
bueno... :-) kan jeg få dig til at kigge på rediger.php? jeg kan tilsyneladende ikke få udtrækkene fra mysgl'en ind i formularerne
13. januar 2006 - 23:52
#19
prøv denne: <?php require("gbog-ting/design-funktioner.php"); require("gbog-ting/mysql-funktioner.php"); require("gbog-ting/indstillinger.php"); $sql = "select id, profilnavn, navn, alder, email, shirtno, position, idol, klub, status, unger, personlig, chang, minde, ord, besked, date_format(tid, '%e/%c %Y, %H:%i') as tiden from andreas order by tid desc limit $start_nr, $antal_ad_gangen"; aabn_forbindelse_og_vaelgdb(); $resultat = sql_spoerg_og_faa_svar($sql); luk_forbindelse(); for($i=0;$i<count($resultat);$i++) { ?> extract($resultat[$i]); <form action="gem.php" method="post"> <div align="center"> <table border="1" width="600" id="table3" style="border-width: 0px" cellspacing="0" cellpadding="0"> <tr> <td style="border-style: none; border-width: medium" bgcolor="#669999"> <blockquote> <blockquote> <p><font size="6"><b>Profilnavn:</b></font><b><font size="6"> </font> <font size="2"> <input type="text" name="profilnavn" value="<?php echo $profilnavn ?>" size="30" maxsize="100"></font></b></p> <p><font size="2"><b>3 ord om dig selv: </b></font> <input type="text" name="ord" value="<?php echo $ord ?>" size="46" maxsize="100"></p> </blockquote> </blockquote> </td> </tr> <tr> <td style="border-style: none; border-width: medium"> </td> </tr> <tr> <td style="border-style: none; border-width: medium"> <table border="1" width="100%" id="table4" style="border-width: 0px" bgcolor="#669999"> <tr> <td width="30%" style="border-style: none; border-width: medium" colspan="5" rowspan="9" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" width="15%" align="right"> <p align="right"><b><font size="2">navn</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="navn" value="<?php echo $navn ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">trøjenummer</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="shirtno" value="<?php echo $shirtno ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">favorit Position</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="position" value="<?php echo $position ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">favorit Spiller(e)</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="idol" value="<?php echo $idol ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">favorit Klub(ber)</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="klub" value="<?php echo $klub ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999"> <b>favorit changspiller</b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="favchang" value="<?php echo $favchang ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#669999" colspan="2"> </td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">ægteskabsstatus</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="status" value="<?php echo $status ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999"> <b><font size="2">børn</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="unger" value="<?php echo $unger ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" align="right" bgcolor="#669999"> </td> <td width="1%" style="border-style: none; border-width: medium" align="right" bgcolor="#669999"> </td> <td width="7%" style="border-style: none; border-width: medium" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" width="20%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#669999" colspan="2"> </td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> <b><font size="2">alder</font></b></td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"> </td> <td width="7%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"><b> <font size="2"> <input type="text" name="alder" value="<?php echo $alder ?>" size="4" maxsize="100"></font></b></td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="36%" align="right" bgcolor="#669999" height="21" colspan="2"> <b><font size="2">personlige Mål i SuperChang</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC" height="21"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" height="42" colspan="2" rowspan="2"><b> <font size="2"> <input type="text" name="personlig" value="<?php echo $personlig ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> <b><font size="2">højde</font></b></td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"> </td> <td width="7%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"><b> <font size="2"> <input type="text" name="height" value="<?php echo $height ?>" size="4" maxsize="100"></font></b></td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="36%" align="right" bgcolor="#669999" height="21" colspan="2"> </td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC" height="21"> </td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> <b><font size="2">vægt</font></b></td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"> </td> <td width="7%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"><b> <font size="2"> <input type="text" name="weight" value="<?php echo $weight ?>" size="4" maxsize="100"></font></b></td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="36%" align="right" bgcolor="#669999" height="21" colspan="2"> <b><font size="2">bedste minde fra SuperChang</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC" height="21"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" height="42" colspan="2" rowspan="2"> <input type="text" name="minde" value="<?php echo $minde ?>" size="36" maxsize="100"></td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> </td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> </td> <td width="7%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="20%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#669999" height="21"> </td> </tr> <tr> <td style="border-style: none; border-width: medium" align="right" colspan="9"> <p align="center"><b><font size="2"> <?php echo $navn; ?>'s Ord</font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" align="right" colspan="9" bgcolor="#FFFFFF"> <b><font size="2"> <textarea cols="71" rows="10" name="besked"></textarea></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="9"> <p align="center"><font size="2"><b>emailadresse: </b> </font> <input type="text" name="email" value="<?php echo $email ?>" size="31" maxsize="100"></td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="9"> </td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="8"> <p align="center"><b><font color="#FF0000">Du kan godt ændre infoen uden at uploade et nyt profilbillede</font></b></td> <td style="border-style: none; border-width: medium" width="21%"> <p align="center"> <input type="submit" value="GEM" name="gem"></td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="9"> <table border="1" width="100%" id="table5" style="border-width: 0px" bgcolor="#669999"> <tr> <td style="border-style: none; border-width: medium" bgcolor="#FFFFFF"> </td> </tr> <tr> <td style="border-style: none; border-width: medium"> <iframe name="I1" src="andreas/upload.php" width="588" height="83" scrolling="no" align="center" border="0" frameborder="0"> Webbrowseren understøtter ikke indbyggede rammer eller er aktuelt konfigureret til ikke at vise indbyggede rammer. </iframe></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </div> <?php } echo bund(); ?>
14. januar 2006 - 00:04
#21
<?php require("gbog-ting/design-funktioner.php"); require("gbog-ting/mysql-funktioner.php"); require("gbog-ting/indstillinger.php"); if(is_array($HTTP_GET_VARS)) { $start_nr = $HTTP_GET_VARS['start_nr']; } elseif (is_array($_GET)) { $start_nr = $_GET['start_nr']; } if(!$start_nr || $start_nr < 0) { $start_nr = 0; } $sql = "select id, profilnavn, navn, alder, email, shirtno, position, idol, klub, status, unger, personlig, chang, minde, ord, besked, date_format(tid, '%e/%c %Y, %H:%i') as tiden from andreas order by tid desc limit $start_nr, $antal_ad_gangen"; aabn_forbindelse_og_vaelgdb(); $resultat = sql_spoerg_og_faa_svar($sql); luk_forbindelse(); for($i=0;$i<count($resultat);$i++) { ?> extract($resultat[$i]); <form action="gem.php" method="post"> <div align="center"> <table border="1" width="600" id="table3" style="border-width: 0px" cellspacing="0" cellpadding="0"> <tr> <td style="border-style: none; border-width: medium" bgcolor="#669999"> <blockquote> <blockquote> <p><font size="6"><b>Profilnavn:</b></font><b><font size="6"> </font> <font size="2"> <input type="text" name="profilnavn" value="<?php echo $profilnavn ?>" size="30" maxsize="100"></font></b></p> <p><font size="2"><b>3 ord om dig selv: </b></font> <input type="text" name="ord" value="<?php echo $ord ?>" size="46" maxsize="100"></p> </blockquote> </blockquote> </td> </tr> <tr> <td style="border-style: none; border-width: medium"> </td> </tr> <tr> <td style="border-style: none; border-width: medium"> <table border="1" width="100%" id="table4" style="border-width: 0px" bgcolor="#669999"> <tr> <td width="30%" style="border-style: none; border-width: medium" colspan="5" rowspan="9" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" width="15%" align="right"> <p align="right"><b><font size="2">navn</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="navn" value="<?php echo $navn ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">trøjenummer</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="shirtno" value="<?php echo $shirtno ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">favorit Position</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="position" value="<?php echo $position ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">favorit Spiller(e)</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="idol" value="<?php echo $idol ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">favorit Klub(ber)</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="klub" value="<?php echo $klub ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999"> <b>favorit changspiller</b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="favchang" value="<?php echo $favchang ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#669999" colspan="2"> </td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">ægteskabsstatus</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="status" value="<?php echo $status ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999"> <b><font size="2">børn</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="unger" value="<?php echo $unger ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" align="right" bgcolor="#669999"> </td> <td width="1%" style="border-style: none; border-width: medium" align="right" bgcolor="#669999"> </td> <td width="7%" style="border-style: none; border-width: medium" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" width="20%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#669999" colspan="2"> </td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> <b><font size="2">alder</font></b></td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"> </td> <td width="7%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"><b> <font size="2"> <input type="text" name="alder" value="<?php echo $alder ?>" size="4" maxsize="100"></font></b></td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="36%" align="right" bgcolor="#669999" height="21" colspan="2"> <b><font size="2">personlige Mål i SuperChang</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC" height="21"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" height="42" colspan="2" rowspan="2"><b> <font size="2"> <input type="text" name="personlig" value="<?php echo $personlig ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> <b><font size="2">højde</font></b></td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"> </td> <td width="7%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"><b> <font size="2"> <input type="text" name="height" value="<?php echo $height ?>" size="4" maxsize="100"></font></b></td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="36%" align="right" bgcolor="#669999" height="21" colspan="2"> </td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC" height="21"> </td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> <b><font size="2">vægt</font></b></td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"> </td> <td width="7%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"><b> <font size="2"> <input type="text" name="weight" value="<?php echo $weight ?>" size="4" maxsize="100"></font></b></td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="36%" align="right" bgcolor="#669999" height="21" colspan="2"> <b><font size="2">bedste minde fra SuperChang</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC" height="21"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" height="42" colspan="2" rowspan="2"> <input type="text" name="minde" value="<?php echo $minde ?>" size="36" maxsize="100"></td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> </td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> </td> <td width="7%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="20%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#669999" height="21"> </td> </tr> <tr> <td style="border-style: none; border-width: medium" align="right" colspan="9"> <p align="center"><b><font size="2"> <?php echo $navn; ?>'s Ord</font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" align="right" colspan="9" bgcolor="#FFFFFF"> <b><font size="2"> <textarea cols="71" rows="10" name="besked"></textarea></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="9"> <p align="center"><font size="2"><b>emailadresse: </b> </font> <input type="text" name="email" value="<?php echo $email ?>" size="31" maxsize="100"></td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="9"> </td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="8"> <p align="center"><b><font color="#FF0000">Du kan godt ændre infoen uden at uploade et nyt profilbillede</font></b></td> <td style="border-style: none; border-width: medium" width="21%"> <p align="center"> <input type="submit" value="GEM" name="gem"></td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="9"> <table border="1" width="100%" id="table5" style="border-width: 0px" bgcolor="#669999"> <tr> <td style="border-style: none; border-width: medium" bgcolor="#FFFFFF"> </td> </tr> <tr> <td style="border-style: none; border-width: medium"> <iframe name="I1" src="andreas/upload.php" width="588" height="83" scrolling="no" align="center" border="0" frameborder="0"> Webbrowseren understøtter ikke indbyggede rammer eller er aktuelt konfigureret til ikke at vise indbyggede rammer. </iframe></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </div> <?php } echo bund(); ?>
14. januar 2006 - 00:12
#22
ny fejl...
14. januar 2006 - 00:15
#23
<?php require("gbog-ting/design-funktioner.php"); require("gbog-ting/mysql-funktioner.php"); require("gbog-ting/indstillinger.php"); if(is_array($HTTP_GET_VARS)) { $start_nr = $HTTP_GET_VARS['start_nr']; } elseif (is_array($_GET)) { $start_nr = $_GET['start_nr']; } if(!$start_nr || $start_nr < 0) { $start_nr = 0; } $sql = "select id, profilnavn, navn, alder, email, shirtno, position, idol, klub, status, unger, personlig, chang, minde, ord, besked, date_format(tid, '%e/%c %Y, %H:%i') as tiden from andreas order by tid desc limit $start_nr, $antal_ad_gangen"; aabn_forbindelse_og_vaelgdb(); $resultat = sql_spoerg_og_faa_svar($sql); luk_forbindelse(); for($i=0;$i<count($resultat);$i++) { extract($resultat[$i]); ?> <form action="gem.php" method="post"> <div align="center"> <table border="1" width="600" id="table3" style="border-width: 0px" cellspacing="0" cellpadding="0"> <tr> <td style="border-style: none; border-width: medium" bgcolor="#669999"> <blockquote> <blockquote> <p><font size="6"><b>Profilnavn:</b></font><b><font size="6"> </font> <font size="2"> <input type="text" name="profilnavn" value="<?php echo $profilnavn ?>" size="30" maxsize="100"></font></b></p> <p><font size="2"><b>3 ord om dig selv: </b></font> <input type="text" name="ord" value="<?php echo $ord ?>" size="46" maxsize="100"></p> </blockquote> </blockquote> </td> </tr> <tr> <td style="border-style: none; border-width: medium"> </td> </tr> <tr> <td style="border-style: none; border-width: medium"> <table border="1" width="100%" id="table4" style="border-width: 0px" bgcolor="#669999"> <tr> <td width="30%" style="border-style: none; border-width: medium" colspan="5" rowspan="9" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" width="15%" align="right"> <p align="right"><b><font size="2">navn</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="navn" value="<?php echo $navn ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">trøjenummer</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="shirtno" value="<?php echo $shirtno ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">favorit Position</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="position" value="<?php echo $position ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">favorit Spiller(e)</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="idol" value="<?php echo $idol ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">favorit Klub(ber)</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="klub" value="<?php echo $klub ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999"> <b>favorit changspiller</b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="favchang" value="<?php echo $favchang ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#669999" colspan="2"> </td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right"> <b><font size="2">ægteskabsstatus</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="status" value="<?php echo $status ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999"> <b><font size="2">børn</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" colspan="2"><b> <font size="2"> <input type="text" name="unger" value="<?php echo $unger ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" align="right" bgcolor="#669999"> </td> <td width="1%" style="border-style: none; border-width: medium" align="right" bgcolor="#669999"> </td> <td width="7%" style="border-style: none; border-width: medium" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" width="20%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#669999"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#669999" colspan="2"> </td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> <b><font size="2">alder</font></b></td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"> </td> <td width="7%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"><b> <font size="2"> <input type="text" name="alder" value="<?php echo $alder ?>" size="4" maxsize="100"></font></b></td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="36%" align="right" bgcolor="#669999" height="21" colspan="2"> <b><font size="2">personlige Mål i SuperChang</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC" height="21"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" height="42" colspan="2" rowspan="2"><b> <font size="2"> <input type="text" name="personlig" value="<?php echo $personlig ?>" size="36" maxsize="100"></font></b></td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> <b><font size="2">højde</font></b></td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"> </td> <td width="7%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"><b> <font size="2"> <input type="text" name="height" value="<?php echo $height ?>" size="4" maxsize="100"></font></b></td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="36%" align="right" bgcolor="#669999" height="21" colspan="2"> </td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC" height="21"> </td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> <b><font size="2">vægt</font></b></td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"> </td> <td width="7%" style="border-style: none; border-width: medium" bgcolor="#99CCCC" height="21"><b> <font size="2"> <input type="text" name="weight" value="<?php echo $weight ?>" size="4" maxsize="100"></font></b></td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="36%" align="right" bgcolor="#669999" height="21" colspan="2"> <b><font size="2">bedste minde fra SuperChang</font></b></td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#99CCCC" height="21"> </td> <td style="border-style: none; border-width: medium" align="left" width="42%" bgcolor="#99CCCC" height="42" colspan="2" rowspan="2"> <input type="text" name="minde" value="<?php echo $minde ?>" size="36" maxsize="100"></td> </tr> <tr> <td width="5%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> </td> <td width="1%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> </td> <td width="7%" style="border-style: none; border-width: medium" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="2%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="20%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" width="15%" align="right" bgcolor="#669999" height="21"> </td> <td style="border-style: none; border-width: medium" align="left" width="1%" bgcolor="#669999" height="21"> </td> </tr> <tr> <td style="border-style: none; border-width: medium" align="right" colspan="9"> <p align="center"><b><font size="2"> <?php echo $navn; ?>'s Ord</font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" align="right" colspan="9" bgcolor="#FFFFFF"> <b><font size="2"> <textarea cols="71" rows="10" name="besked"></textarea></font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="9"> <p align="center"><font size="2"><b>emailadresse: </b> </font> <input type="text" name="email" value="<?php echo $email ?>" size="31" maxsize="100"></td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="9"> </td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="8"> <p align="center"><b><font color="#FF0000">Du kan godt ændre infoen uden at uploade et nyt profilbillede</font></b></td> <td style="border-style: none; border-width: medium" width="21%"> <p align="center"> <input type="submit" value="GEM" name="gem"></td> </tr> <tr> <td style="border-style: none; border-width: medium" colspan="9"> <table border="1" width="100%" id="table5" style="border-width: 0px" bgcolor="#669999"> <tr> <td style="border-style: none; border-width: medium" bgcolor="#FFFFFF"> </td> </tr> <tr> <td style="border-style: none; border-width: medium"> <iframe name="I1" src="andreas/upload.php" width="588" height="83" scrolling="no" align="center" border="0" frameborder="0"> Webbrowseren understøtter ikke indbyggede rammer eller er aktuelt konfigureret til ikke at vise indbyggede rammer. </iframe></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </div> <?php } echo bund(); ?>
14. januar 2006 - 00:18
#24
yes!!! så virker det. rigtig mange tak :-) vil du have flere points?
14. januar 2006 - 00:29
#25
nej tak - gem du dine point til en anden gang - kun glad for at kunne hjælpe. Var jo selv i samme situation for år tilbage, da jeg startede med PHP. Lærte rigtig meget her på sitet
14. januar 2006 - 10:57
#26
ja længe leve eksperten :-) men mange tak for hjælpen
Vi tilbyder markedets bedste kurser inden for webudvikling