Microsoft
Software
Hardware
Network
Question : PHP MYSQL insert multiple records
I have 5 text fields called genre[] and I am trying to fill them all in and have them all enter into a table. (5 rows) I have tried the below but it give me the error: PHP Warning: mysql_query(): 1 is not a valid MySQL-Link resource
<?php
$dbc = mysql_connect('localhost',
'root', 'root')
or die ('Cannot connect');
mysql_select_db("video", $dbc);
if (isset($_POST['Submit'])) {
foreach ($_POST['genre'] as $genre_insert) {
$query = "INSERT INTO genre(Genre) VALUES('$genre_insert')";
$result = mysql_query($query, $dbc);
mysql_close($dbc);
}
}
?>
Answer : PHP MYSQL insert multiple records
Here is a link to the only one I know of. Works well. Simply download, install and select your brushes folder...
http://abrviewer.sourcefor
ge.net
Good luck!
Posted via EE Mobile
Random Solutions
Error in installation of Oracle 11g R2 on RHEL 5.3
How do I check if a window is already open or give it focus using Flex/Flash
Exchange 2010 with Outlook 2003
DSUM with multiple rows and multiple columns
comment SP
add second virtual nic to virtual switch - esxi 4 with vCenter 4
Wireless Internet problem
Copy large file
SQL Statement. Copy and paste characters from cell into another in same record
Translate web site