I have a website that uses php and mysql. I wanna make an admin section so i don't have to open Phpmyadmin everytime i wanna change something on my site. For this i need to know how to delete and add (maybe other stuff too) rows in a db from within the site itself, meaning from inside the .php files; maybe through a hyperlink or something.
Can anyone help ?
n/a
Pete Nattress Cheesy Bits img src/uploads/sccheesegif
Registered 23/09/2002
Points 4811
23rd April, 2004 at 06:14:00 -
you just do a standard mysql query to edit the table. you'll have to look up the exact syntax, it's:
mysql_query('ALTER TABLE `tablename` ADD `rowname` VARCHAR(255) NOT NULL;');
PhpMyAdmin is made in PHP, why not take a look at how that works? When you change something, it tells you the SQL query that it used
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G