I'm using mysql v
5.0.51. The database is on my host server at
ipower.com.
I cannot get UPDATE write to the database.
I know it's something is my code - I'm a total novice to databases in
general. I've opened the database within the same .php file, I display data
just fine. Can't update from the code, though. Using the same user, I AM
able to update using the host's online phpmyadmin. So, can you help me with
my code? Here it is:
I open the db and table with this,
$host = "host_name";
$db = "dbEvents";
$user = "dbAdmin";
$password = "secret";
"mysql_connect ($host, $user, $password) or die ("Cant open the db because:
" . mysql_error() );
mysql_select_db ($db);
$query = mysql_db_query($db, "SELECT * FROM announcementsTable order by
idx"); $record = mysql_fetch_array($query);"
I can read all the records and their fields.
I build a table of each record where I edit the record in a (very
abbreviated) form: "title" is a field name, it's data is assigned to
"TitleName".
"while ($results = mysql_fetch_array($query)) {
...