How am i supposed to insert a word into a blank row?

$sql = "INSERT INTO ue-userfile WHERE id='$imageid' AND userid='$userid' (`albumname`) VALUES('$newalbum')";

?

$sql  = "
            INSERT INTO `ue-userfile` (
              ``,  ``, ``, ``, ``, ``,``,`albumname`
            )
            VALUES ('{$albumname}')";

?
God damn annoying to not find any solution on how to insert or update a blank row...

faroukmuhammad commented: You 've solve it yourself, the second option will work. +4

i only need one inserted.

mysql_query("UPDATE ue-userfile SET userid = 'The userid' WHERE id = 'the id'");

Is that what you wanted?

if(isset($_POST['albumname']) && $_POST['imageid']){

	$newalbum = $_POST['albumname'];
	$newalbum = htmlentities($newalbum);
	
	$imageid = $_POST['imageid'];

	$imageid = htmlentities($imageid);
	$sql5 = "UPDATE ue-userfile SET albumname = '$newalbum' WHERE id = '$imageid'";
	$result5 = mysql_query($sql5);}

i've checked my connection to the database, also the outputs of the variables, its all fine. but it wont change the current album name to the new one $newalbum

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.