Jump to content

mysql syntax input for the database?


ballhogjoni

Recommended Posts

I am wondering why this does not write to my db? Can someone help me out a little? Thanks in advance

 

$index_page_title=$_GET['index_page_title'];

if (!empty($index_page_title)) {
include('config.php');

if (mysql_query('SELECT * FROM title WHERE ID==1') == TRUE) {
	mysql_query('UPDATE title SET Title = $index_page_title');
} else { 
	mysql_query("INSERT INTO title (Title) VALUES ('$index_page_title')");
}

Link to comment
https://forums.phpfreaks.com/topic/58149-mysql-syntax-input-for-the-database/
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.