imarockstar Posted June 26, 2009 Share Posted June 26, 2009 can anyone see any errors in this ? <?php // Open database here // Let's pretend these values were passed by a form $_POST['name'] = "Bob Marley"; $_POST['country'] = "Jamaica"; $_POST['music'] = "Reggae"; $_POST['submit'] = "Submit"; // Insert all the values of $_POST into the database table `artists`, except // for $_POST['submit']. Remember, field names are determined by array keys! $result = mysql_insert_array("artists", $_POST, "submit"); // Results if( $result['mysql_error'] ) { echo "Query Failed: " . $result['mysql_error']; } else { echo "Query Succeeded! <br />"; echo "<pre>"; print_r($result); echo "</pre>"; } // Close database ?> i am getting this error : Fatal error: Call to undefined function mysql_insert_array() in /home/franklin/public_html/sites/questions/scripts/gq_go.php on line 18 Quote Link to comment https://forums.phpfreaks.com/topic/163797-mysql_insert_array-help-using-php/ Share on other sites More sharing options...
.josh Posted June 26, 2009 Share Posted June 26, 2009 mysql_insert_array() is not a predefined function. It's some random user-defined function that is missing from your code (hence the undefined function error) Quote Link to comment https://forums.phpfreaks.com/topic/163797-mysql_insert_array-help-using-php/#findComment-864254 Share on other sites More sharing options...
Maq Posted June 26, 2009 Share Posted June 26, 2009 Well that's not a native function. I don't see any definitions or includes, maybe you're looking for another function? Quote Link to comment https://forums.phpfreaks.com/topic/163797-mysql_insert_array-help-using-php/#findComment-864255 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.