Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Update NAME_OF_SITE problem Need Help

Author  Topic 

tonycoding
Starting Member

2 Posts

Posted - 2011-06-25 : 12:32:54
I'm having trouble with this cant get it to work


This below will make a text box; in the text box you would put the name of whatever the site would be
then once you press next then it would update the sql table like text scrapping in the TABLE_metatags; Its supossed to rename the ="NAME_OF_SITE" PART but I cant get it to work proper it wont update
this part I've tried lots of things but no luck just yet.

this PHP page is form.php; this example calls once
<td class="inputField"><?php echo 'name of site<br />' . draw_input_field('SITE_CEW', null, 'class="text"'); ?></td>



then update works like this goes and updtes the Table_metatags
db_query('update ' . table_metatags . ' SET id = "' . trim($HTTP_POST['SITE_CEW']) . '" WHERE meta name = "description" AND Content = "NAME_OF_SITE"');



And this is the last thing it will do is rename the meta name in the
Table_metatags below example

-- Table structure for table `metatags`
--

CREATE TABLE IF NOT EXISTS `metatags` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`mtags` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `metatags`
--

INSERT INTO `metatags` (`id`, `mtags`) VALUES
(1, '<meta name="description" content="NAME_OF_SITE" />\r\n<meta name="keywords" content="WHAT_ITS_ABOUT" />\r\n<meta name="author" content="THE_AUTHOR" />\r\n');




I need help with this I tried many things I know I'm close but
still cant seem to break this to make it work

Any help would grateful!!:)

Thank you much,

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-06-25 : 12:45:32
SQLTeam is a Microsoft SQL Server site, we don't really cover MySQL or PHP. There are other sites that can answer your question better: http://dbforums.com/
Go to Top of Page

tonycoding
Starting Member

2 Posts

Posted - 2011-06-25 : 13:06:56
Thank you for your fast reply robvolk:)
I will give http://dbforums.com/ a try.
Thanks:)
Go to Top of Page
   

- Advertisement -