Nnaut Posted July 16, 2012 Share Posted July 16, 2012 Okay, so i a problem with my Php coding Basically, i dont know what the problem is, but the Update function has stopped working for some reason ( deletes entire entries) also the Delete function deletes all of the the entries instead of that specific row. Plesse tell me what the problem is http://min.us/mbePuoHZAG Quote Link to comment https://forums.phpfreaks.com/topic/265737-php-array-file/ Share on other sites More sharing options...
Adam Posted July 16, 2012 Share Posted July 16, 2012 You need to provide us with more information. Where abouts does the update and delete code live? What are "entire entries"? Has anything changed recently that might explain why some code has randomly stopped working? We're happy to help you but you need to meet us half way. Quote Link to comment https://forums.phpfreaks.com/topic/265737-php-array-file/#findComment-1361837 Share on other sites More sharing options...
Nnaut Posted July 16, 2012 Author Share Posted July 16, 2012 Okay, im sorta a noob with Php or Coding in general Im using Server2Go Basically, When i click on form name.html, it brings me to a fill out form. Once that is completed, a database is shown, showing all entries Now when i come to click on Delete on that row, it deletes the entire database When i click on Update, it takes me back to form name.php, in which i can edit information Once done, you then clcik on Add, and the edited data then shows up. But the problem is that it doesnt and i want to know why the Update and Delete dont work properly So if you see any coding errors please tell me PLEASEE Quote Link to comment https://forums.phpfreaks.com/topic/265737-php-array-file/#findComment-1361843 Share on other sites More sharing options...
lordshoa Posted July 16, 2012 Share Posted July 16, 2012 I think amend to file not write to file txt_fns.php function writeTable $fp = @fopen($tablename, "w"); fwrite($fp, $output, strlen($output)); fclose($fp); } So should be $fp = @fopen($tablename, "a+"); fwrite($fp, $output, strlen($output)); fclose($fp); } Quote Link to comment https://forums.phpfreaks.com/topic/265737-php-array-file/#findComment-1361850 Share on other sites More sharing options...
Nnaut Posted July 16, 2012 Author Share Posted July 16, 2012 I cant figure out why it is doing this, its driving me insane Quote Link to comment https://forums.phpfreaks.com/topic/265737-php-array-file/#findComment-1361862 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.