Created
December 15, 2014 23:50
-
-
Save Dimmern/00e4a88986472eb6a74f to your computer and use it in GitHub Desktop.
Input wont update in db
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php include("mysql_open.php");?> | |
<?php | |
if($_POST['Submit']=="Opdater"){ | |
$result = mysql_query("UPDATE `fp_text` SET `fp_id`=[value-1],`fp_header`=[value-2],`fp_text`=[value-3] WHERE 1"); | |
} | |
?> | |
<form action="index.php" name="text_edit1" method="post" enctype="multipart/form-data"> | |
<?php | |
$query = mysql_query("SELECT * FROM `fp_text` WHERE 1"); | |
while($row = mysql_fetch_array($query)){ | |
?> | |
<div style="font-family: 'PT Sans', sans-serif;"> | |
Overskrift<br /> <input name="fp_header<?= $row['id'] ?>" type="text" size="64" maxlength="64" value="<?= $row['fp_header'] ?>" /><br /> | |
<br /> | |
Beskrivelse af Stutteriet:<br /> <textarea name="fp_text<?= $row['id'] ?>" cols="50" rows="16"><?= $row['fp_text'] ?></textarea><br /><br /><br /> | |
</div> | |
<?php | |
} | |
?> | |
<input name="Submit" type="submit" id="Submit" value="Opdater" /> | |
</form> | |
<?php mysql_close($db); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment