Jump to content

Updating database with PHP


bluedot

Recommended Posts

Hi I have an Events database that displays a list of upcoming events. I would like members of my site to be able to edit the events in the database. I currently have:

mysql_query("UPDATE Events (date, Times, Title, moreinfo) VALUES('$date', '$time', '$title', '$moreinfo') WHERE eventid='$id'  ")
or die(mysql_error());

I have an html form with:
<form id="form1" name="form1" method="post" action="eventsedit.php">
that sends the form data to eventsedit.php as you can see.
eventsedit.php is were the above query is.

When this runs nothing happens. I know im connecting the the database correctly. Im pretty new to PHP and very new to mysql. So any suggestions would be great.
Link to comment
https://forums.phpfreaks.com/topic/30518-updating-database-with-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.