irkevin Posted December 12, 2008 Share Posted December 12, 2008 I dont know if this is related to PHP or Mysql ! Excuse me for that Well, can someone explain what this error mean? I'm trying to process a form that will store information in MYsql, but it returns this error instead.. What does it means? Quote Link to comment https://forums.phpfreaks.com/topic/136638-got-error-1-from-storage-engine/ Share on other sites More sharing options...
genericnumber1 Posted December 12, 2008 Share Posted December 12, 2008 Post your code and the exact error message? Quote Link to comment https://forums.phpfreaks.com/topic/136638-got-error-1-from-storage-engine/#findComment-713469 Share on other sites More sharing options...
irkevin Posted December 12, 2008 Author Share Posted December 12, 2008 <?php $submit = $_POST['submit']; if(isset($submit)) { include("scripts/config.php"); //the path for our logo to be stored $target_path = "uploads/"; $target_path = $target_path . basename( $_FILES['logo']['name']); if(move_uploaded_file($_FILES['logo']['tmp_name'], $target_path)) { $logo = "../uploads/".basename( $_FILES['uploadedfile']['name']); } else { echo "There was an error uploading the file, please try again!"; } $title = $_POST['title']; $surname = $_POST['surname']; $name = $_POST['name']; $profile = $_POST['profile']; $company = $_POST['company']; $nature = $_POST['nature']; $position = $_POST['position']; $industry = $_POST['industry']; $addline1 = $_POST['addline1']; $addline2 = $_POST['addline2']; $phone = $_POST['phone']; $fax = $_POST['fax']; $email = $_POST['email']; $website = $_POST['website']; $insert = "INSERT INTO directory(id,title,surname,name,profil,company,nature,position,industry,add1,add2,phone, fax,email,website,path)VALUES('','$title','$surname','$name','$profile','$company', '$nature','$position','$industry','$addline1','$addline2','$phone','$fax','$email', '$website','$target_path')"; $result = mysql_query($insert,$link)or die(mysql_error()); if($result) { echo "Your information was successfully sent to our Directory Database"; } else { "An error occured. Contact the administrator"; } }// end if else { ?> <form method="post" action="app_data.php?id=<?php echo $_GET['id'];?>" enctype="multipart/form-data"> <fieldset> <legend>Directory Details</legend> <ol> <li> <label for="title">Title</label> <select name="title"> <option value="Mr" selected="selected">Mr</option> <option value="Mrs">Mrs</option> <option value="Miss">Miss</option> <option value="Dr">Dr</option> </select> </li> <li> <label for="surname">Surname</label> <input type="text" name="surname" id="name" class="text" /> </li> <li> <label for="name">Name</label> <input type="text" name="name" id="idnumber" class="text" /> </li> <li> <label for="profile">Profile</label> <select name="profile"> <option value="Professional" selected="selected">Professional</option> <option value="Businessman">Businessman</option> </select> </li> <li> <label for="company">Company</label> <input type="text" name="company" class="text" /> </li> <li> <label for="nature">Nature</label> <input type="text" name="nature" class="text" /> </li> <li> <label for="position">Position</label> <input type="text" name="phone" class="text" /> </li> <li> <label for="industry">Industry</label> <input type="text" name="industry" class="text" /> </li> <li> <label for="addline1">Address (Line 1)</label> <input type="text" name="addline1" class="text" /> </li> <li> <label for="addline2">Address (Line 2)</label> <input type="text" name="addline2" class="text" /> </li> <li> <label for="phone">Phone No.</label> <input type="text" name="phone" class="text" /> </li> <li> <label for="fax">Fax</label> <input type="text" name="fax" class="text" /> </li> <li> <label for="email">Email</label> <input type="text" name="email" id="addline2" class="text" /> </li> <li> <label for="logo">Upload your Logo</label> <input type="file" name="logo" id="addline2" class="text" accept="image/jpeg" /> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> </li> <li> <label for="website">Website</label> <input type="text" name="website" id="addline2" class="text" /> without the http:// </li> </ol> </fieldset> <fieldset class="submit"> <input type="submit" name="submit" value="Submit my Information" class="submit" /> </fieldset> </form> <?php } ?> As for the error, it's exactly what is says in the Title. Got error -1 from storage engine Its the first time i got this message. Everything is working well on Local, but on the server it throws the -1 error Quote Link to comment https://forums.phpfreaks.com/topic/136638-got-error-1-from-storage-engine/#findComment-713471 Share on other sites More sharing options...
Philip Posted December 12, 2008 Share Posted December 12, 2008 Going to take a guess, in your query: ...,name,profil,company,... profil or profile? Quote Link to comment https://forums.phpfreaks.com/topic/136638-got-error-1-from-storage-engine/#findComment-713473 Share on other sites More sharing options...
irkevin Posted December 12, 2008 Author Share Posted December 12, 2008 hehe KingPhilip, its profil ! Actually, its working.. I've dropped the table and create a new one.. Looks like the problem was with the table directory itself!! Well, hope this solution will work for someone else! Quote Link to comment https://forums.phpfreaks.com/topic/136638-got-error-1-from-storage-engine/#findComment-713475 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.