TT2 Posted August 28, 2007 Share Posted August 28, 2007 I have a mysql problem. I created a blog with an admin center. If I want to edit my post en press de save butten it should update my database but it doesn't do anything. I asked soms friends to check my code, but they don't see anything wrong with it. I hope you guys can help me. It goes to the correct function where the update takes place, but it doesn't do the update ??? } elseif($_GET['do']=="editnews") { include("style.php"); $select = mysql_query("SELECT * FROM BLOG WHERE ID = $_GET[i]"); while($list = mysql_fetch_object($select)) { ?> <script language="javascript"> function icon(thing) {document.BLOG.Tekst.value = document.BLOG.Tekst.value + thing;} </script> <?php echo" <form method=\"POST\"> <table cellspacing=\"0\" border=\"0\" cellspacing=\"0\" align=\"center\"> <tr> <td>ID: </td> <td><input type=\"text\" value=\"$list->ID\" name=\"nid\" size=\"19\" maxlength=\"40\"></td> </tr> <tr> <td>Dag: </td> <td><input type=\"text\" value=\"$list->Dag\" name=\"eday\" size=\"19\" maxlength=\"40\"></td> </tr> <tr> <td>Maand: </td> <td><input type=\"text\" value=\"$list->Maand\" name=\"emonth\" size=\"19\" maxlength=\"40\"></td> </tr> <tr> <td>Jaar: </td> <td><input type=\"text\" value=\"$list->Jaar\" name=\"eyear\" size=\"19\" maxlength=\"40\"></td> </tr> <tr> <td>Tijd: </td> <td><input type=\"text\" value=\"$list->Tijd\" name=\"etime\" size=\"19\" maxlength=\"40\"></td> </tr> <tr> <td>Onderwerp: </td> <td><input type=\"text\" value=\"$list->Titel\" name=\"esubject\" size=\"19\" maxlength=\"40\"></td> </tr> <tr> <td>Bericht: </td> <td><textarea name=\"emessage\" cols=\"45\" rows=\"8\">$list->Tekst</textarea><br>$htmltext</td> </tr> "; editbar(); echo" <tr> <td colspan=\"2\"> [color=red]<input type=\"submit\" value=\"Wijzig Nieuws\" name=\"editnews\">[/color] <input type=\"submit\" value=\"Annuleer\" name=\"cancel\"> </td> </tr> </table> </form> "; } } } elseif(isset($_POST['editnews'])) { /*include("style.php");*/ /*$edit2 = explode("'","Het artikel is gewijzigd... ' Klik hier om terug te gaan");*/ mysql_query("UPDATE BLOG SET Dag = $_POST[eday], Maand = $_POST[emonth], Jaar = $_POST[eyear], Tijd = $_POST[etime], Tekst = $_POST[emessage], Titel = $_POST[esubject] WHERE ID = $_POST[nid]"); echo"<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL=$_SERVER[php_SELF]\">"; Quote Link to comment https://forums.phpfreaks.com/topic/67054-update-doesnt-update/ Share on other sites More sharing options...
TT2 Posted August 28, 2007 Author Share Posted August 28, 2007 this is what my error log says: [28-Aug-2007 10:58:50] PHP Warning: Unknown(): Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20020429/php_curl.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20020429/php_curl.dll: cannot open shared object file: No such file or directory in Unknown on line 0 ??? Quote Link to comment https://forums.phpfreaks.com/topic/67054-update-doesnt-update/#findComment-336271 Share on other sites More sharing options...
TT2 Posted August 28, 2007 Author Share Posted August 28, 2007 IT's OK Quote Link to comment https://forums.phpfreaks.com/topic/67054-update-doesnt-update/#findComment-336307 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.