Jump to content

Mysql insert and update error


FraanXT

Recommended Posts

I can't find the error, someone help me please.

 

                $conn = mysql_connect("localhost","root","Pass");
                $err_db = mysql_select_db('bd_amics');
                $sql = ("INSERT INTO `'".$_SESSION["use"][14]."'` (ID,Amic,PubID) VALUES ('".$_SESSION["person"][14]."', "1", '".$_SESSION["person"][15]."')");
                mysql_query("SET NAMES utf8");
                mysql_query($sql, $conn);
                mysql_close();

 

                $conn3 = mysql_connect("localhost","root","Pass");
                $err_db3 = mysql_select_db('bd_amics');
                $sql3 = ("UPDATE `'".$_SESSION["person"][14]."'` SET Amic="2" WHERE ID='".$_SESSION["use"][14]);
                mysql_query("SET NAMES utf8");
                mysql_query($sql3, $conn3);
                mysql_close();

Link to comment
https://forums.phpfreaks.com/topic/288785-mysql-insert-and-update-error/
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.