Ik heb dit script:
Dan kan je iets in de tabel aanpassen, maar in de tekstvakken wil ik hebben welke tekst er momenteel in de tabel staat dus tekstveld met name woord1 laat tabel woord1 zien van het id. Kan iemand me helpen?
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]config.php[/COLOR][COLOR= #007700]);[/COLOR]
?>
[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]verzenden[/COLOR][COLOR= #007700]]))
{[/COLOR]
[COLOR= #0000BB]$woord1[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/addslashes"]addslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]woord1[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$woord2[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/addslashes"]addslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]woord2[/COLOR][COLOR= #007700]]);[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE woorden SET woord1="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$woord1[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]", woord2="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$woord2[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" WHERE id="[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$qLid[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM woorden WHERE id = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/while"]while[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$aLid[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$qLid[/COLOR][COLOR= #007700]))[/COLOR]
[URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"<meta http-equiv=refresh content=2 />Aangepast!"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
?>
<center>
<form action="" method="POST">
Woord 1: <br><input type="text" name="woord1"><br />
Woord 2: <br><input type="text" name="woord2"><br />
<input type="submit" name="verzenden" value="aanpassen">
</form> </center>
[COLOR= #0000BB]<?[/COLOR]
[COLOR= #007700]}[/COLOR]
?> Dan kan je iets in de tabel aanpassen, maar in de tekstvakken wil ik hebben welke tekst er momenteel in de tabel staat dus tekstveld met name woord1 laat tabel woord1 zien van het id. Kan iemand me helpen?