Jump to content

Inserting into mysql...


cbastian

Recommended Posts

I've got a file that resizes photos and creates thumbs. I'm trying to make it also insert the data into my mysql database. It works if I try to insert certain text, but not variables. Here is what I'm using, right now:

mysql_query("INSERT INTO compphotos (imgSrc, imgAlt, imgThumb)VALUES ($sourcefl, 'Gala 2008', $destfilesm)");

if I change the last part to something like:

VALUES ('field1', 'field2', 'field3')

then it writes those words in the database... Anyone know why it won't write the values of the variables as well? I'm kinda new to this, so this may be a really basic question.Thanks for any help!-Charles...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...